KILLED proof of input_WUxBLZlidl.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, INF). (0) CpxRelTRS (1) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 439 ms] (2) CpxRelTRS (3) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (4) CpxTRS (5) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxRelTRS (7) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (8) CpxWeightedTrs (9) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxWeightedTrs (11) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTypedWeightedTrs (13) CompletionProof [UPPER BOUND(ID), 0 ms] (14) CpxTypedWeightedCompleteTrs (15) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (16) CpxRNTS (17) CompletionProof [UPPER BOUND(ID), 0 ms] (18) CpxTypedWeightedCompleteTrs (19) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CpxTypedWeightedCompleteTrs (21) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (24) CpxRNTS (25) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 142 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 57 ms] (32) CpxRNTS (33) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 358 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 64 ms] (38) CpxRNTS (39) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 406 ms] (42) CpxRNTS (43) IntTrsBoundProof [UPPER BOUND(ID), 84 ms] (44) CpxRNTS (45) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (46) CpxRNTS (47) IntTrsBoundProof [UPPER BOUND(ID), 403 ms] (48) CpxRNTS (49) IntTrsBoundProof [UPPER BOUND(ID), 95 ms] (50) CpxRNTS (51) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (52) CpxRNTS (53) IntTrsBoundProof [UPPER BOUND(ID), 23.7 s] (54) CpxRNTS (55) IntTrsBoundProof [UPPER BOUND(ID), 5154 ms] (56) CpxRNTS (57) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (58) CdtProblem (59) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (60) CdtProblem (61) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (62) CdtProblem (63) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (64) CdtProblem (65) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (66) CdtProblem (67) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 47 ms] (68) CdtProblem (69) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (70) CdtProblem (71) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (72) CdtProblem (73) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (74) CdtProblem (75) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 37 ms] (76) CdtProblem (77) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 74 ms] (78) CdtProblem (79) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (80) CdtProblem (81) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (82) CdtProblem (83) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (84) CdtProblem (85) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 82 ms] (86) CdtProblem (87) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 72 ms] (88) CdtProblem (89) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (90) CdtProblem (91) CdtGraphSplitRhsProof [BOTH BOUNDS(ID, ID), 0 ms] (92) CdtProblem (93) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 43 ms] (94) CdtProblem (95) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (96) CdtProblem (97) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (98) CdtProblem (99) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (100) CdtProblem (101) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (102) CdtProblem (103) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (104) CdtProblem (105) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (106) CdtProblem (107) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (108) CdtProblem (109) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (110) CdtProblem (111) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (112) CdtProblem (113) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 86 ms] (114) CdtProblem (115) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (116) CdtProblem (117) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 118 ms] (118) CdtProblem (119) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 4 ms] (120) CdtProblem (121) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (122) CdtProblem (123) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (124) CdtProblem (125) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (126) CdtProblem (127) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (128) CdtProblem (129) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 89 ms] (130) CdtProblem (131) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 88 ms] (132) CdtProblem (133) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 2 ms] (134) CdtProblem (135) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (136) CdtProblem (137) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (138) CdtProblem (139) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (140) CdtProblem (141) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (142) CdtProblem (143) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (144) CdtProblem (145) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (146) CdtProblem (147) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (148) CdtProblem (149) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (150) CdtProblem (151) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (152) CdtProblem (153) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (154) CdtProblem (155) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (156) CdtProblem (157) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (158) CdtProblem (159) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (160) CdtProblem (161) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (162) CdtProblem (163) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (164) CdtProblem (165) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 121 ms] (166) CdtProblem (167) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 123 ms] (168) CdtProblem (169) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (170) CdtProblem (171) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (172) CdtProblem (173) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (174) CdtProblem (175) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (176) CdtProblem (177) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (178) CdtProblem (179) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (180) CdtProblem (181) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (182) CdtProblem (183) CdtRewritingProof [BOTH BOUNDS(ID, ID), 4 ms] (184) CdtProblem (185) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (186) CdtProblem (187) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (188) CdtProblem (189) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (190) CdtProblem (191) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (192) CdtProblem (193) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (194) CdtProblem (195) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (196) CdtProblem (197) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (198) CdtProblem (199) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (200) CdtProblem (201) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (202) CdtProblem (203) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (204) CdtProblem (205) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (206) CdtProblem (207) CdtRewritingProof [BOTH BOUNDS(ID, ID), 0 ms] (208) CdtProblem (209) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (210) CdtProblem (211) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (212) CdtProblem (213) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (214) CdtProblem (215) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (216) CdtProblem (217) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 182 ms] (218) CdtProblem (219) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (220) CdtProblem (221) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (222) CdtProblem (223) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (224) CdtProblem (225) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (226) CdtProblem ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil) quicksort(Cons(x, Nil)) -> Cons(x, Nil) quicksort(Nil) -> Nil part(x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite](>(x', x), x', Cons(x, xs), xs1, xs2) part(x, Nil, xs1, xs2) -> app(quicksort(xs1), quicksort(xs2)) app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) app(Nil, ys) -> ys notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False goal(xs) -> quicksort(xs) The (relative) TRS S consists of the following rules: <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False >(S(x), S(y)) -> >(x, y) >(0, y) -> False >(S(x), 0) -> True part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) -> part(x', xs, Cons(x, xs1), xs2) part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite][False][Ite](<(x', x), x', Cons(x, xs), xs1, xs2) Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (2) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil) quicksort(Cons(x, Nil)) -> Cons(x, Nil) quicksort(Nil) -> Nil part(x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite](>(x', x), x', Cons(x, xs), xs1, xs2) part(x, Nil, xs1, xs2) -> app(quicksort(xs1), quicksort(xs2)) app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) app(Nil, ys) -> ys notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False goal(xs) -> quicksort(xs) The (relative) TRS S consists of the following rules: <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False >(S(x), S(y)) -> >(x, y) >(0, y) -> False >(S(x), 0) -> True part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) -> part(x', xs, Cons(x, xs1), xs2) part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite][False][Ite](<(x', x), x', Cons(x, xs), xs1, xs2) Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (3) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (4) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil) quicksort(Cons(x, Nil)) -> Cons(x, Nil) quicksort(Nil) -> Nil part(x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite](>(x', x), x', Cons(x, xs), xs1, xs2) part(x, Nil, xs1, xs2) -> app(quicksort(xs1), quicksort(xs2)) app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) app(Nil, ys) -> ys notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False goal(xs) -> quicksort(xs) <(S(x), S(y)) -> <(x, y) <(0, S(y)) -> True <(x, 0) -> False >(S(x), S(y)) -> >(x, y) >(0, y) -> False >(S(x), 0) -> True part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) -> part(x', xs, Cons(x, xs1), xs2) part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite][False][Ite](<(x', x), x', Cons(x, xs), xs1, xs2) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (5) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (6) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil) quicksort(Cons(x, Nil)) -> Cons(x, Nil) quicksort(Nil) -> Nil part(x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite](>(x', x), x', Cons(x, xs), xs1, xs2) part(x, Nil, xs1, xs2) -> app(quicksort(xs1), quicksort(xs2)) app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) app(Nil, ys) -> ys notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False goal(xs) -> quicksort(xs) The (relative) TRS S consists of the following rules: <(S(x), S(y)) -> <(x, y) <(0', S(y)) -> True <(x, 0') -> False >(S(x), S(y)) -> >(x, y) >(0', y) -> False >(S(x), 0') -> True part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) -> part(x', xs, Cons(x, xs1), xs2) part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite][False][Ite](<(x', x), x', Cons(x, xs), xs1, xs2) Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (7) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (8) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil) [1] quicksort(Cons(x, Nil)) -> Cons(x, Nil) [1] quicksort(Nil) -> Nil [1] part(x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite](>(x', x), x', Cons(x, xs), xs1, xs2) [1] part(x, Nil, xs1, xs2) -> app(quicksort(xs1), quicksort(xs2)) [1] app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) [1] app(Nil, ys) -> ys [1] notEmpty(Cons(x, xs)) -> True [1] notEmpty(Nil) -> False [1] goal(xs) -> quicksort(xs) [1] <(S(x), S(y)) -> <(x, y) [0] <(0, S(y)) -> True [0] <(x, 0) -> False [0] >(S(x), S(y)) -> >(x, y) [0] >(0, y) -> False [0] >(S(x), 0) -> True [0] part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) -> part(x', xs, Cons(x, xs1), xs2) [0] part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite][False][Ite](<(x', x), x', Cons(x, xs), xs1, xs2) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (9) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) Renamed defined symbols to avoid conflicts with arithmetic symbols: > => gr < => lt ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil) [1] quicksort(Cons(x, Nil)) -> Cons(x, Nil) [1] quicksort(Nil) -> Nil [1] part(x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite](gr(x', x), x', Cons(x, xs), xs1, xs2) [1] part(x, Nil, xs1, xs2) -> app(quicksort(xs1), quicksort(xs2)) [1] app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) [1] app(Nil, ys) -> ys [1] notEmpty(Cons(x, xs)) -> True [1] notEmpty(Nil) -> False [1] goal(xs) -> quicksort(xs) [1] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] gr(S(x), S(y)) -> gr(x, y) [0] gr(0, y) -> False [0] gr(S(x), 0) -> True [0] part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) -> part(x', xs, Cons(x, xs1), xs2) [0] part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite][False][Ite](lt(x', x), x', Cons(x, xs), xs1, xs2) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (12) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil) [1] quicksort(Cons(x, Nil)) -> Cons(x, Nil) [1] quicksort(Nil) -> Nil [1] part(x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite](gr(x', x), x', Cons(x, xs), xs1, xs2) [1] part(x, Nil, xs1, xs2) -> app(quicksort(xs1), quicksort(xs2)) [1] app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) [1] app(Nil, ys) -> ys [1] notEmpty(Cons(x, xs)) -> True [1] notEmpty(Nil) -> False [1] goal(xs) -> quicksort(xs) [1] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] gr(S(x), S(y)) -> gr(x, y) [0] gr(0, y) -> False [0] gr(S(x), 0) -> True [0] part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) -> part(x', xs, Cons(x, xs1), xs2) [0] part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite][False][Ite](lt(x', x), x', Cons(x, xs), xs1, xs2) [0] The TRS has the following type information: quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] Cons :: S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] part :: S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite] part[Ite][True][Ite] :: True:False -> S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] gr :: S:0 -> S:0 -> True:False app :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> True:False True :: True:False False :: True:False goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] lt :: S:0 -> S:0 -> True:False S :: S:0 -> S:0 0 :: S:0 part[Ite][True][Ite][False][Ite] :: True:False -> S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] Rewrite Strategy: INNERMOST ---------------------------------------- (13) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: lt(v0, v1) -> null_lt [0] gr(v0, v1) -> null_gr [0] part[Ite][True][Ite](v0, v1, v2, v3, v4) -> null_part[Ite][True][Ite] [0] quicksort(v0) -> null_quicksort [0] part(v0, v1, v2, v3) -> null_part [0] app(v0, v1) -> null_app [0] notEmpty(v0) -> null_notEmpty [0] And the following fresh constants: null_lt, null_gr, null_part[Ite][True][Ite], null_quicksort, null_part, null_app, null_notEmpty ---------------------------------------- (14) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil) [1] quicksort(Cons(x, Nil)) -> Cons(x, Nil) [1] quicksort(Nil) -> Nil [1] part(x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite](gr(x', x), x', Cons(x, xs), xs1, xs2) [1] part(x, Nil, xs1, xs2) -> app(quicksort(xs1), quicksort(xs2)) [1] app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) [1] app(Nil, ys) -> ys [1] notEmpty(Cons(x, xs)) -> True [1] notEmpty(Nil) -> False [1] goal(xs) -> quicksort(xs) [1] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] gr(S(x), S(y)) -> gr(x, y) [0] gr(0, y) -> False [0] gr(S(x), 0) -> True [0] part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) -> part(x', xs, Cons(x, xs1), xs2) [0] part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite][False][Ite](lt(x', x), x', Cons(x, xs), xs1, xs2) [0] lt(v0, v1) -> null_lt [0] gr(v0, v1) -> null_gr [0] part[Ite][True][Ite](v0, v1, v2, v3, v4) -> null_part[Ite][True][Ite] [0] quicksort(v0) -> null_quicksort [0] part(v0, v1, v2, v3) -> null_part [0] app(v0, v1) -> null_app [0] notEmpty(v0) -> null_notEmpty [0] The TRS has the following type information: quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app Cons :: S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app part :: S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app part[Ite][True][Ite] :: True:False:null_lt:null_gr:null_notEmpty -> S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app gr :: S:0 -> S:0 -> True:False:null_lt:null_gr:null_notEmpty app :: Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> True:False:null_lt:null_gr:null_notEmpty True :: True:False:null_lt:null_gr:null_notEmpty False :: True:False:null_lt:null_gr:null_notEmpty goal :: Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app lt :: S:0 -> S:0 -> True:False:null_lt:null_gr:null_notEmpty S :: S:0 -> S:0 0 :: S:0 part[Ite][True][Ite][False][Ite] :: True:False:null_lt:null_gr:null_notEmpty -> S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app -> Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app null_lt :: True:False:null_lt:null_gr:null_notEmpty null_gr :: True:False:null_lt:null_gr:null_notEmpty null_part[Ite][True][Ite] :: Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app null_quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app null_part :: Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app null_app :: Cons:Nil:part[Ite][True][Ite][False][Ite]:null_part[Ite][True][Ite]:null_quicksort:null_part:null_app null_notEmpty :: True:False:null_lt:null_gr:null_notEmpty Rewrite Strategy: INNERMOST ---------------------------------------- (15) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: Nil => 0 True => 2 False => 1 0 => 0 null_lt => 0 null_gr => 0 null_part[Ite][True][Ite] => 0 null_quicksort => 0 null_part => 0 null_app => 0 null_notEmpty => 0 ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> ys :|: z' = ys, ys >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 app(z, z') -{ 1 }-> 1 + x + app(xs, ys) :|: z = 1 + x + xs, xs >= 0, z' = ys, ys >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(xs) :|: xs >= 0, z = xs gr(z, z') -{ 0 }-> gr(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x gr(z, z') -{ 0 }-> 2 :|: x >= 0, z = 1 + x, z' = 0 gr(z, z') -{ 0 }-> 1 :|: y >= 0, z = 0, z' = y gr(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 lt(z, z') -{ 0 }-> lt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x lt(z, z') -{ 0 }-> 2 :|: z' = 1 + y, y >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: x >= 0, z = x, z' = 0 lt(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 notEmpty(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](gr(x', x), x', 1 + x + xs, xs1, xs2) :|: xs >= 0, xs2 >= 0, z' = 1 + x + xs, z1 = xs2, x' >= 0, x >= 0, z'' = xs1, xs1 >= 0, z = x' part(z, z', z'', z1) -{ 1 }-> app(quicksort(xs1), quicksort(xs2)) :|: xs2 >= 0, z1 = xs2, x >= 0, z'' = xs1, xs1 >= 0, z = x, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(x', xs, 1 + x + xs1, xs2) :|: z = 2, z' = x', xs >= 0, xs2 >= 0, z2 = xs2, x' >= 0, x >= 0, z1 = xs1, xs1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z1 = v3, v0 >= 0, v4 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, z2 = v4, v2 >= 0, v3 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(x', x) + x' + (1 + x + xs) + xs1 + xs2 :|: z' = x', xs >= 0, xs2 >= 0, z = 1, z2 = xs2, x' >= 0, x >= 0, z1 = xs1, xs1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 quicksort(z) -{ 1 }-> 1 + x + 0 :|: x >= 0, z = 1 + x + 0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (17) CompletionProof (UPPER BOUND(ID)) The transformation into a RNTS is sound, since: (a) The obligation is a constructor system where every type has a constant constructor, (b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols: notEmpty_1 goal_1 (c) The following functions are completely defined: quicksort_1 part_4 app_2 lt_2 gr_2 part[Ite][True][Ite]_5 Due to the following rules being added: lt(v0, v1) -> null_lt [0] gr(v0, v1) -> null_gr [0] part[Ite][True][Ite](v0, v1, v2, v3, v4) -> Nil [0] quicksort(v0) -> Nil [0] part(v0, v1, v2, v3) -> Nil [0] app(v0, v1) -> Nil [0] And the following fresh constants: null_lt, null_gr ---------------------------------------- (18) Obligation: Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil) [1] quicksort(Cons(x, Nil)) -> Cons(x, Nil) [1] quicksort(Nil) -> Nil [1] part(x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite](gr(x', x), x', Cons(x, xs), xs1, xs2) [1] part(x, Nil, xs1, xs2) -> app(quicksort(xs1), quicksort(xs2)) [1] app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) [1] app(Nil, ys) -> ys [1] notEmpty(Cons(x, xs)) -> True [1] notEmpty(Nil) -> False [1] goal(xs) -> quicksort(xs) [1] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] gr(S(x), S(y)) -> gr(x, y) [0] gr(0, y) -> False [0] gr(S(x), 0) -> True [0] part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) -> part(x', xs, Cons(x, xs1), xs2) [0] part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite][False][Ite](lt(x', x), x', Cons(x, xs), xs1, xs2) [0] lt(v0, v1) -> null_lt [0] gr(v0, v1) -> null_gr [0] part[Ite][True][Ite](v0, v1, v2, v3, v4) -> Nil [0] quicksort(v0) -> Nil [0] part(v0, v1, v2, v3) -> Nil [0] app(v0, v1) -> Nil [0] The TRS has the following type information: quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] Cons :: S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] part :: S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite] part[Ite][True][Ite] :: True:False:null_lt:null_gr -> S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] gr :: S:0 -> S:0 -> True:False:null_lt:null_gr app :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> True:False:null_lt:null_gr True :: True:False:null_lt:null_gr False :: True:False:null_lt:null_gr goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] lt :: S:0 -> S:0 -> True:False:null_lt:null_gr S :: S:0 -> S:0 0 :: S:0 part[Ite][True][Ite][False][Ite] :: True:False:null_lt:null_gr -> S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] null_lt :: True:False:null_lt:null_gr null_gr :: True:False:null_lt:null_gr Rewrite Strategy: INNERMOST ---------------------------------------- (19) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (20) Obligation: Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: quicksort(Cons(x, Cons(x', xs))) -> part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil) [1] quicksort(Cons(x, Nil)) -> Cons(x, Nil) [1] quicksort(Nil) -> Nil [1] part(S(x''), Cons(S(y'), xs), xs1, xs2) -> part[Ite][True][Ite](gr(x'', y'), S(x''), Cons(S(y'), xs), xs1, xs2) [1] part(0, Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite](False, 0, Cons(x, xs), xs1, xs2) [1] part(S(x1), Cons(0, xs), xs1, xs2) -> part[Ite][True][Ite](True, S(x1), Cons(0, xs), xs1, xs2) [1] part(x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite](null_gr, x', Cons(x, xs), xs1, xs2) [1] part(x, Nil, Cons(x2, Cons(x''', xs')), Cons(x4, Cons(x'1, xs''))) -> app(part(x2, Cons(x2, Cons(x''', xs')), Cons(x2, Nil), Nil), part(x4, Cons(x4, Cons(x'1, xs'')), Cons(x4, Nil), Nil)) [3] part(x, Nil, Cons(x2, Cons(x''', xs')), Cons(x5, Nil)) -> app(part(x2, Cons(x2, Cons(x''', xs')), Cons(x2, Nil), Nil), Cons(x5, Nil)) [3] part(x, Nil, Cons(x2, Cons(x''', xs')), Nil) -> app(part(x2, Cons(x2, Cons(x''', xs')), Cons(x2, Nil), Nil), Nil) [3] part(x, Nil, Cons(x2, Cons(x''', xs')), xs2) -> app(part(x2, Cons(x2, Cons(x''', xs')), Cons(x2, Nil), Nil), Nil) [2] part(x, Nil, Cons(x3, Nil), Cons(x6, Cons(x'2, xs3))) -> app(Cons(x3, Nil), part(x6, Cons(x6, Cons(x'2, xs3)), Cons(x6, Nil), Nil)) [3] part(x, Nil, Cons(x3, Nil), Cons(x7, Nil)) -> app(Cons(x3, Nil), Cons(x7, Nil)) [3] part(x, Nil, Cons(x3, Nil), Nil) -> app(Cons(x3, Nil), Nil) [3] part(x, Nil, Cons(x3, Nil), xs2) -> app(Cons(x3, Nil), Nil) [2] part(x, Nil, Nil, Cons(x8, Cons(x'3, xs4))) -> app(Nil, part(x8, Cons(x8, Cons(x'3, xs4)), Cons(x8, Nil), Nil)) [3] part(x, Nil, Nil, Cons(x9, Nil)) -> app(Nil, Cons(x9, Nil)) [3] part(x, Nil, Nil, Nil) -> app(Nil, Nil) [3] part(x, Nil, Nil, xs2) -> app(Nil, Nil) [2] part(x, Nil, xs1, Cons(x10, Cons(x'4, xs5))) -> app(Nil, part(x10, Cons(x10, Cons(x'4, xs5)), Cons(x10, Nil), Nil)) [2] part(x, Nil, xs1, Cons(x11, Nil)) -> app(Nil, Cons(x11, Nil)) [2] part(x, Nil, xs1, Nil) -> app(Nil, Nil) [2] part(x, Nil, xs1, xs2) -> app(Nil, Nil) [1] app(Cons(x, xs), ys) -> Cons(x, app(xs, ys)) [1] app(Nil, ys) -> ys [1] notEmpty(Cons(x, xs)) -> True [1] notEmpty(Nil) -> False [1] goal(xs) -> quicksort(xs) [1] lt(S(x), S(y)) -> lt(x, y) [0] lt(0, S(y)) -> True [0] lt(x, 0) -> False [0] gr(S(x), S(y)) -> gr(x, y) [0] gr(0, y) -> False [0] gr(S(x), 0) -> True [0] part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) -> part(x', xs, Cons(x, xs1), xs2) [0] part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) -> part[Ite][True][Ite][False][Ite](lt(x', x), x', Cons(x, xs), xs1, xs2) [0] lt(v0, v1) -> null_lt [0] gr(v0, v1) -> null_gr [0] part[Ite][True][Ite](v0, v1, v2, v3, v4) -> Nil [0] quicksort(v0) -> Nil [0] part(v0, v1, v2, v3) -> Nil [0] app(v0, v1) -> Nil [0] The TRS has the following type information: quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] Cons :: S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] part :: S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite] part[Ite][True][Ite] :: True:False:null_lt:null_gr -> S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] gr :: S:0 -> S:0 -> True:False:null_lt:null_gr app :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> True:False:null_lt:null_gr True :: True:False:null_lt:null_gr False :: True:False:null_lt:null_gr goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] lt :: S:0 -> S:0 -> True:False:null_lt:null_gr S :: S:0 -> S:0 0 :: S:0 part[Ite][True][Ite][False][Ite] :: True:False:null_lt:null_gr -> S:0 -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] -> Cons:Nil:part[Ite][True][Ite][False][Ite] null_lt :: True:False:null_lt:null_gr null_gr :: True:False:null_lt:null_gr Rewrite Strategy: INNERMOST ---------------------------------------- (21) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: Nil => 0 True => 2 False => 1 0 => 0 null_lt => 0 null_gr => 0 ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> ys :|: z' = ys, ys >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 app(z, z') -{ 1 }-> 1 + x + app(xs, ys) :|: z = 1 + x + xs, xs >= 0, z' = ys, ys >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(xs) :|: xs >= 0, z = xs gr(z, z') -{ 0 }-> gr(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x gr(z, z') -{ 0 }-> 2 :|: x >= 0, z = 1 + x, z' = 0 gr(z, z') -{ 0 }-> 1 :|: y >= 0, z = 0, z' = y gr(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 lt(z, z') -{ 0 }-> lt(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x lt(z, z') -{ 0 }-> 2 :|: z' = 1 + y, y >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: x >= 0, z = x, z' = 0 lt(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](gr(x'', y'), 1 + x'', 1 + (1 + y') + xs, xs1, xs2) :|: z = 1 + x'', xs >= 0, xs2 >= 0, z' = 1 + (1 + y') + xs, z1 = xs2, y' >= 0, z'' = xs1, xs1 >= 0, x'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + x1, 1 + 0 + xs, xs1, xs2) :|: xs >= 0, x1 >= 0, xs2 >= 0, z' = 1 + 0 + xs, z1 = xs2, z = 1 + x1, z'' = xs1, xs1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, xs1, xs2) :|: xs >= 0, xs2 >= 0, z' = 1 + x + xs, z1 = xs2, x >= 0, z'' = xs1, xs1 >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, x', 1 + x + xs, xs1, xs2) :|: xs >= 0, xs2 >= 0, z' = 1 + x + xs, z1 = xs2, x' >= 0, x >= 0, z'' = xs1, xs1 >= 0, z = x' part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, x >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, z = x, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), x >= 0, xs' >= 0, x''' >= 0, z = x, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: xs2 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z1 = xs2, x >= 0, xs' >= 0, x''' >= 0, z = x, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + x5 + 0) :|: x5 >= 0, z1 = 1 + x5 + 0, z'' = 1 + x2 + (1 + x''' + xs'), x >= 0, xs' >= 0, x''' >= 0, z = x, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), x >= 0, z'' = xs1, xs1 >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z = x, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, x >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z = x, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, x >= 0, z = x, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, xs2 >= 0, z1 = xs2, x >= 0, z = x, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, x >= 0, z'' = xs1, xs1 >= 0, z = x, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: xs2 >= 0, z1 = xs2, x >= 0, z'' = xs1, xs1 >= 0, z = x, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + x11 + 0) :|: z1 = 1 + x11 + 0, x >= 0, z'' = xs1, x11 >= 0, xs1 >= 0, z = x, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + x9 + 0) :|: z'' = 0, x >= 0, z1 = 1 + x9 + 0, z = x, x9 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + x3 + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: x >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z = x, z'' = 1 + x3 + 0, x3 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + x3 + 0, 0) :|: z1 = 0, x >= 0, z = x, z'' = 1 + x3 + 0, x3 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + x3 + 0, 0) :|: xs2 >= 0, z1 = xs2, x >= 0, z = x, z'' = 1 + x3 + 0, x3 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + x3 + 0, 1 + x7 + 0) :|: x7 >= 0, x >= 0, z = x, z'' = 1 + x3 + 0, z1 = 1 + x7 + 0, x3 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(x', xs, 1 + x + xs1, xs2) :|: z = 2, z' = x', xs >= 0, xs2 >= 0, z2 = xs2, x' >= 0, x >= 0, z1 = xs1, xs1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z1 = v3, v0 >= 0, v4 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, z2 = v4, v2 >= 0, v3 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(x', x) + x' + (1 + x + xs) + xs1 + xs2 :|: z' = x', xs >= 0, xs2 >= 0, z = 1, z2 = xs2, x' >= 0, x >= 0, z1 = xs1, xs1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 quicksort(z) -{ 1 }-> 1 + x + 0 :|: x >= 0, z = 1 + x + 0 ---------------------------------------- (23) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](gr(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(z', x) + z' + (1 + x + xs) + z1 + z2 :|: xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 ---------------------------------------- (25) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { notEmpty } { gr } { lt } { app } { part[Ite][True][Ite], part } { quicksort } { goal } ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](gr(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(z', x) + z' + (1 + x + xs) + z1 + z2 :|: xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {notEmpty}, {gr}, {lt}, {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} ---------------------------------------- (27) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](gr(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(z', x) + z' + (1 + x + xs) + z1 + z2 :|: xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {notEmpty}, {gr}, {lt}, {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: notEmpty after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 2 ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](gr(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(z', x) + z' + (1 + x + xs) + z1 + z2 :|: xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {notEmpty}, {gr}, {lt}, {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: ?, size: O(1) [2] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: notEmpty after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](gr(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(z', x) + z' + (1 + x + xs) + z1 + z2 :|: xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {gr}, {lt}, {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] ---------------------------------------- (33) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](gr(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(z', x) + z' + (1 + x + xs) + z1 + z2 :|: xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {gr}, {lt}, {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: gr after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 2 ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](gr(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(z', x) + z' + (1 + x + xs) + z1 + z2 :|: xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {gr}, {lt}, {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] gr: runtime: ?, size: O(1) [2] ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: gr after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> gr(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](gr(z - 1, y'), 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(z', x) + z' + (1 + x + xs) + z1 + z2 :|: xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {lt}, {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] gr: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (39) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](s, 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(z', x) + z' + (1 + x + xs) + z1 + z2 :|: xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {lt}, {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] gr: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (41) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: lt after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 2 ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](s, 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(z', x) + z' + (1 + x + xs) + z1 + z2 :|: xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {lt}, {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] gr: runtime: O(1) [0], size: O(1) [2] lt: runtime: ?, size: O(1) [2] ---------------------------------------- (43) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: lt after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (44) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> lt(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](s, 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + lt(z', x) + z' + (1 + x + xs) + z1 + z2 :|: xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] gr: runtime: O(1) [0], size: O(1) [2] lt: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (45) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (46) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](s, 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + s1 + z' + (1 + x + xs) + z1 + z2 :|: s1 >= 0, s1 <= 2, xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] gr: runtime: O(1) [0], size: O(1) [2] lt: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (47) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: app after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z + z' ---------------------------------------- (48) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](s, 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + s1 + z' + (1 + x + xs) + z1 + z2 :|: s1 >= 0, s1 <= 2, xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {app}, {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] gr: runtime: O(1) [0], size: O(1) [2] lt: runtime: O(1) [0], size: O(1) [2] app: runtime: ?, size: O(n^1) [z + z'] ---------------------------------------- (49) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: app after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (50) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 1 }-> 1 + x + app(xs, z') :|: z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](s, 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 0) :|: z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 0) :|: z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> app(0, 0) :|: z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, 1 + (z1 - 1) + 0) :|: z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, 1 + (z1 - 1) + 0) :|: z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(1 + (z'' - 1) + 0, 0) :|: z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + s1 + z' + (1 + x + xs) + z1 + z2 :|: s1 >= 0, s1 <= 2, xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] gr: runtime: O(1) [0], size: O(1) [2] lt: runtime: O(1) [0], size: O(1) [2] app: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] ---------------------------------------- (51) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (52) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 2 + xs }-> 1 + x + s11 :|: s11 >= 0, s11 <= xs + z', z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 2 }-> s10 :|: s10 >= 0, s10 <= 0 + 0, z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 4 + z'' }-> s2 :|: s2 >= 0, s2 <= 1 + (z'' - 1) + 0 + (1 + (z1 - 1) + 0), z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 4 + z'' }-> s3 :|: s3 >= 0, s3 <= 1 + (z'' - 1) + 0 + 0, z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 + z'' }-> s4 :|: s4 >= 0, s4 <= 1 + (z'' - 1) + 0 + 0, z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 4 }-> s5 :|: s5 >= 0, s5 <= 0 + (1 + (z1 - 1) + 0), z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 4 }-> s6 :|: s6 >= 0, s6 <= 0 + 0, z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> s7 :|: s7 >= 0, s7 <= 0 + 0, z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> s8 :|: s8 >= 0, s8 <= 0 + (1 + (z1 - 1) + 0), z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> s9 :|: s9 >= 0, s9 <= 0 + 0, z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](s, 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + s1 + z' + (1 + x + xs) + z1 + z2 :|: s1 >= 0, s1 <= 2, xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] gr: runtime: O(1) [0], size: O(1) [2] lt: runtime: O(1) [0], size: O(1) [2] app: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] ---------------------------------------- (53) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: part[Ite][True][Ite] after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? Computed SIZE bound using CoFloCo for: part after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (54) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 2 + xs }-> 1 + x + s11 :|: s11 >= 0, s11 <= xs + z', z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 2 }-> s10 :|: s10 >= 0, s10 <= 0 + 0, z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 4 + z'' }-> s2 :|: s2 >= 0, s2 <= 1 + (z'' - 1) + 0 + (1 + (z1 - 1) + 0), z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 4 + z'' }-> s3 :|: s3 >= 0, s3 <= 1 + (z'' - 1) + 0 + 0, z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 + z'' }-> s4 :|: s4 >= 0, s4 <= 1 + (z'' - 1) + 0 + 0, z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 4 }-> s5 :|: s5 >= 0, s5 <= 0 + (1 + (z1 - 1) + 0), z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 4 }-> s6 :|: s6 >= 0, s6 <= 0 + 0, z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> s7 :|: s7 >= 0, s7 <= 0 + 0, z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> s8 :|: s8 >= 0, s8 <= 0 + (1 + (z1 - 1) + 0), z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> s9 :|: s9 >= 0, s9 <= 0 + 0, z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](s, 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + s1 + z' + (1 + x + xs) + z1 + z2 :|: s1 >= 0, s1 <= 2, xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] gr: runtime: O(1) [0], size: O(1) [2] lt: runtime: O(1) [0], size: O(1) [2] app: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] part[Ite][True][Ite]: runtime: ?, size: INF part: runtime: ?, size: INF ---------------------------------------- (55) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: part[Ite][True][Ite] after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (56) Obligation: Complexity RNTS consisting of the following rules: app(z, z') -{ 1 }-> z' :|: z' >= 0, z = 0 app(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 app(z, z') -{ 2 + xs }-> 1 + x + s11 :|: s11 >= 0, s11 <= xs + z', z = 1 + x + xs, xs >= 0, z' >= 0, x >= 0 goal(z) -{ 1 }-> quicksort(z) :|: z >= 0 gr(z, z') -{ 0 }-> s' :|: s' >= 0, s' <= 2, z - 1 >= 0, z' - 1 >= 0 gr(z, z') -{ 0 }-> 2 :|: z - 1 >= 0, z' = 0 gr(z, z') -{ 0 }-> 1 :|: z' >= 0, z = 0 gr(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 lt(z, z') -{ 0 }-> s'' :|: s'' >= 0, s'' <= 2, z - 1 >= 0, z' - 1 >= 0 lt(z, z') -{ 0 }-> 2 :|: z' - 1 >= 0, z = 0 lt(z, z') -{ 0 }-> 1 :|: z >= 0, z' = 0 lt(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 part(z, z', z'', z1) -{ 2 }-> s10 :|: s10 >= 0, s10 <= 0 + 0, z1 >= 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 4 + z'' }-> s2 :|: s2 >= 0, s2 <= 1 + (z'' - 1) + 0 + (1 + (z1 - 1) + 0), z1 - 1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 4 + z'' }-> s3 :|: s3 >= 0, s3 <= 1 + (z'' - 1) + 0 + 0, z1 = 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 + z'' }-> s4 :|: s4 >= 0, s4 <= 1 + (z'' - 1) + 0 + 0, z1 >= 0, z >= 0, z'' - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 4 }-> s5 :|: s5 >= 0, s5 <= 0 + (1 + (z1 - 1) + 0), z'' = 0, z >= 0, z1 - 1 >= 0, z' = 0 part(z, z', z'', z1) -{ 4 }-> s6 :|: s6 >= 0, s6 <= 0 + 0, z'' = 0, z1 = 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> s7 :|: s7 >= 0, s7 <= 0 + 0, z'' = 0, z1 >= 0, z >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> s8 :|: s8 >= 0, s8 <= 0 + (1 + (z1 - 1) + 0), z >= 0, z1 - 1 >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> s9 :|: s9 >= 0, s9 <= 0 + 0, z1 = 0, z >= 0, z'' >= 0, z' = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](s, 1 + (z - 1), 1 + (1 + y') + xs, z'', z1) :|: s >= 0, s <= 2, xs >= 0, z1 >= 0, z' = 1 + (1 + y') + xs, y' >= 0, z'' >= 0, z - 1 >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](2, 1 + (z - 1), 1 + 0 + (z' - 1), z'', z1) :|: z' - 1 >= 0, z - 1 >= 0, z1 >= 0, z'' >= 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](1, 0, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, x >= 0, z'' >= 0, z = 0 part(z, z', z'', z1) -{ 1 }-> part[Ite][True][Ite](0, z, 1 + x + xs, z'', z1) :|: xs >= 0, z1 >= 0, z' = 1 + x + xs, z >= 0, x >= 0, z'' >= 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), part(x4, 1 + x4 + (1 + x'1 + xs''), 1 + x4 + 0, 0)) :|: x4 >= 0, z1 = 1 + x4 + (1 + x'1 + xs''), z'' = 1 + x2 + (1 + x''' + xs'), x'1 >= 0, z >= 0, xs' >= 0, xs'' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 = 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 0) :|: z1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(part(x2, 1 + x2 + (1 + x''' + xs'), 1 + x2 + 0, 0), 1 + (z1 - 1) + 0) :|: z1 - 1 >= 0, z'' = 1 + x2 + (1 + x''' + xs'), z >= 0, xs' >= 0, x''' >= 0, x2 >= 0, z' = 0 part(z, z', z'', z1) -{ 2 }-> app(0, part(x10, 1 + x10 + (1 + x'4 + xs5), 1 + x10 + 0, 0)) :|: z1 = 1 + x10 + (1 + x'4 + xs5), z >= 0, z'' >= 0, x10 >= 0, x'4 >= 0, xs5 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(0, part(x8, 1 + x8 + (1 + x'3 + xs4), 1 + x8 + 0, 0)) :|: z'' = 0, x8 >= 0, x'3 >= 0, z >= 0, z1 = 1 + x8 + (1 + x'3 + xs4), xs4 >= 0, z' = 0 part(z, z', z'', z1) -{ 3 }-> app(1 + (z'' - 1) + 0, part(x6, 1 + x6 + (1 + x'2 + xs3), 1 + x6 + 0, 0)) :|: z >= 0, x6 >= 0, x'2 >= 0, z1 = 1 + x6 + (1 + x'2 + xs3), z'' - 1 >= 0, z' = 0, xs3 >= 0 part(z, z', z'', z1) -{ 0 }-> 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> part(z', xs, 1 + x + z1, z2) :|: z = 2, xs >= 0, z2 >= 0, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0 part[Ite][True][Ite](z, z', z'', z1, z2) -{ 0 }-> 1 + s1 + z' + (1 + x + xs) + z1 + z2 :|: s1 >= 0, s1 <= 2, xs >= 0, z2 >= 0, z = 1, z' >= 0, x >= 0, z1 >= 0, z'' = 1 + x + xs quicksort(z) -{ 1 }-> part(x, 1 + x + (1 + x' + xs), 1 + x + 0, 0) :|: xs >= 0, x >= 0, x' >= 0, z = 1 + x + (1 + x' + xs) quicksort(z) -{ 1 }-> 0 :|: z = 0 quicksort(z) -{ 0 }-> 0 :|: z >= 0 quicksort(z) -{ 1 }-> 1 + (z - 1) + 0 :|: z - 1 >= 0 Function symbols to be analyzed: {part[Ite][True][Ite],part}, {quicksort}, {goal} Previous analysis results are: notEmpty: runtime: O(1) [1], size: O(1) [2] gr: runtime: O(1) [0], size: O(1) [2] lt: runtime: O(1) [0], size: O(1) [2] app: runtime: O(n^1) [1 + z], size: O(n^1) [z + z'] part[Ite][True][Ite]: runtime: INF, size: INF part: runtime: ?, size: INF ---------------------------------------- (57) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (58) Obligation: Complexity Dependency Tuples Problem Rules: <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> quicksort(z0) Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) <'(0, S(z0)) -> c1 <'(z0, 0) -> c2 >'(S(z0), S(z1)) -> c3(>'(z0, z1)) >'(0, z0) -> c4 >'(S(z0), 0) -> c5 PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) QUICKSORT(Cons(z0, Nil)) -> c9 QUICKSORT(Nil) -> c10 PART(z0, Cons(z1, z2), z3, z4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), z0, Cons(z1, z2), z3, z4), >'(z0, z1)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) APP(Nil, z0) -> c15 NOTEMPTY(Cons(z0, z1)) -> c16 NOTEMPTY(Nil) -> c17 GOAL(z0) -> c18(QUICKSORT(z0)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) QUICKSORT(Cons(z0, Nil)) -> c9 QUICKSORT(Nil) -> c10 PART(z0, Cons(z1, z2), z3, z4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), z0, Cons(z1, z2), z3, z4), >'(z0, z1)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) APP(Nil, z0) -> c15 NOTEMPTY(Cons(z0, z1)) -> c16 NOTEMPTY(Nil) -> c17 GOAL(z0) -> c18(QUICKSORT(z0)) K tuples:none Defined Rule Symbols: quicksort_1, part_4, app_2, notEmpty_1, goal_1, <_2, >_2, part[Ite][True][Ite]_5 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, PART_4, APP_2, NOTEMPTY_1, GOAL_1 Compound Symbols: c_1, c1, c2, c3_1, c4, c5, c6_1, c7_1, c8_1, c9, c10, c11_2, c12_2, c13_2, c14_1, c15, c16, c17, c18_1 ---------------------------------------- (59) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: GOAL(z0) -> c18(QUICKSORT(z0)) Removed 9 trailing nodes: NOTEMPTY(Nil) -> c17 <'(0, S(z0)) -> c1 QUICKSORT(Cons(z0, Nil)) -> c9 >'(S(z0), 0) -> c5 <'(z0, 0) -> c2 >'(0, z0) -> c4 QUICKSORT(Nil) -> c10 NOTEMPTY(Cons(z0, z1)) -> c16 APP(Nil, z0) -> c15 ---------------------------------------- (60) Obligation: Complexity Dependency Tuples Problem Rules: <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> quicksort(z0) Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Cons(z1, z2), z3, z4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), z0, Cons(z1, z2), z3, z4), >'(z0, z1)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Cons(z1, z2), z3, z4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), z0, Cons(z1, z2), z3, z4), >'(z0, z1)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) K tuples:none Defined Rule Symbols: quicksort_1, part_4, app_2, notEmpty_1, goal_1, <_2, >_2, part[Ite][True][Ite]_5 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, PART_4, APP_2 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c11_2, c12_2, c13_2, c14_1 ---------------------------------------- (61) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0) -> quicksort(z0) ---------------------------------------- (62) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Cons(z1, z2), z3, z4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), z0, Cons(z1, z2), z3, z4), >'(z0, z1)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Cons(z1, z2), z3, z4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), z0, Cons(z1, z2), z3, z4), >'(z0, z1)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) K tuples:none Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, PART_4, APP_2 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c11_2, c12_2, c13_2, c14_1 ---------------------------------------- (63) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(z0, Cons(z1, z2), z3, z4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), z0, Cons(z1, z2), z3, z4), >'(z0, z1)) by PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4), >'(0, z0)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4), >'(S(z0), 0)) ---------------------------------------- (64) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4), >'(0, z0)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4), >'(S(z0), 0)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4), >'(0, z0)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4), >'(S(z0), 0)) K tuples:none Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, PART_4, APP_2 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c12_2, c13_2, c14_1, c11_2 ---------------------------------------- (65) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing tuple parts ---------------------------------------- (66) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) K tuples:none Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, PART_4, APP_2 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c12_2, c13_2, c14_1, c11_2, c11_1 ---------------------------------------- (67) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) We considered the (Usable) Rules: >(S(z0), 0) -> True >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(<(x_1, x_2)) = [1] POL(<'(x_1, x_2)) = 0 POL(>(x_1, x_2)) = [1] POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = 0 POL(False) = 0 POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = [1] + x_4 POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_1 + x_5 POL(QUICKSORT(x_1)) = [1] POL(S(x_1)) = 0 POL(True) = [1] POL(app(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = [1] + x_1 + x_4 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(quicksort(x_1)) = x_1 ---------------------------------------- (68) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, PART_4, APP_2 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c12_2, c13_2, c14_1, c11_2, c11_1 ---------------------------------------- (69) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(z0, Nil, z1, z2) -> c12(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z1)) by PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Nil, x2) -> c12(APP(Nil, quicksort(x2)), QUICKSORT(Nil)) ---------------------------------------- (70) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Nil, x2) -> c12(APP(Nil, quicksort(x2)), QUICKSORT(Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Nil, x2) -> c12(APP(Nil, quicksort(x2)), QUICKSORT(Nil)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, PART_4, APP_2 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c13_2, c14_1, c11_2, c11_1, c12_2 ---------------------------------------- (71) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: PART(x0, Nil, Nil, x2) -> c12(APP(Nil, quicksort(x2)), QUICKSORT(Nil)) ---------------------------------------- (72) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(Cons(z0, Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(Cons(z0, Nil))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, PART_4, APP_2 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c13_2, c14_1, c11_2, c11_1, c12_2 ---------------------------------------- (73) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (74) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, PART_4, APP_2 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c13_2, c14_1, c11_2, c11_1, c12_2, c12_1 ---------------------------------------- (75) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) We considered the (Usable) Rules:none And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(<(x_1, x_2)) = [1] POL(<'(x_1, x_2)) = 0 POL(>(x_1, x_2)) = [1] + x_1 + x_2 POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = [1] POL(False) = [1] POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = x_4 POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_2 + x_5 POL(QUICKSORT(x_1)) = 0 POL(S(x_1)) = 0 POL(True) = 0 POL(app(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = [1] + x_1 + x_4 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(quicksort(x_1)) = 0 ---------------------------------------- (76) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, PART_4, APP_2 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c13_2, c14_1, c11_2, c11_1, c12_2, c12_1 ---------------------------------------- (77) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) We considered the (Usable) Rules: >(S(z0), 0) -> True >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(<(x_1, x_2)) = [1] POL(<'(x_1, x_2)) = 0 POL(>(x_1, x_2)) = [1] POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = x_1 POL(False) = 0 POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = [1] POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_1 + x_2 POL(QUICKSORT(x_1)) = [1] POL(S(x_1)) = 0 POL(True) = [1] POL(app(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = [1] + x_1 + x_4 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(quicksort(x_1)) = 0 ---------------------------------------- (78) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, PART_4, APP_2 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c13_2, c14_1, c11_2, c11_1, c12_2, c12_1 ---------------------------------------- (79) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(z0, Nil, z1, z2) -> c13(APP(quicksort(z1), quicksort(z2)), QUICKSORT(z2)) by PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil), QUICKSORT(Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Nil, x2) -> c13(APP(Nil, quicksort(x2)), QUICKSORT(x2)) ---------------------------------------- (80) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil), QUICKSORT(Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Nil, x2) -> c13(APP(Nil, quicksort(x2)), QUICKSORT(x2)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil), QUICKSORT(Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Nil, x2) -> c13(APP(Nil, quicksort(x2)), QUICKSORT(x2)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_2, c11_1, c12_2, c12_1, c13_2 ---------------------------------------- (81) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing tuple parts ---------------------------------------- (82) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(x0, Nil, Nil, x2) -> c13(QUICKSORT(x2)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(x0, Nil, Nil, x2) -> c13(QUICKSORT(x2)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_2, c11_1, c12_2, c12_1, c13_2, c13_1 ---------------------------------------- (83) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: PART(x0, Nil, Nil, x2) -> c13(QUICKSORT(x2)) ---------------------------------------- (84) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_2, c11_1, c12_2, c12_1, c13_2, c13_1 ---------------------------------------- (85) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) We considered the (Usable) Rules:none And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(<(x_1, x_2)) = [1] POL(<'(x_1, x_2)) = 0 POL(>(x_1, x_2)) = [1] + x_1 + x_2 POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = [1] POL(False) = [1] POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = x_4 POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_2 + x_5 POL(QUICKSORT(x_1)) = 0 POL(S(x_1)) = 0 POL(True) = 0 POL(app(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1)) = x_1 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = [1] + x_1 + x_4 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(quicksort(x_1)) = 0 ---------------------------------------- (86) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_2, c11_1, c12_2, c12_1, c13_2, c13_1 ---------------------------------------- (87) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) We considered the (Usable) Rules:none And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(<(x_1, x_2)) = [1] + x_1 + x_2 POL(<'(x_1, x_2)) = [1] POL(>(x_1, x_2)) = [1] + x_1 + x_2 POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = [1] POL(False) = [1] POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = [1] POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_3 POL(QUICKSORT(x_1)) = [1] POL(S(x_1)) = x_1 POL(True) = [1] POL(app(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1)) = x_1 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = [1] + x_1 + x_4 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(quicksort(x_1)) = 0 ---------------------------------------- (88) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_2, c11_1, c12_2, c12_1, c13_2, c13_1 ---------------------------------------- (89) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(S(z0), Cons(S(z1), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(z0), Cons(S(z1), x2), x3, x4), >'(S(z0), S(z1))) by PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4), >'(S(0), S(z0))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) ---------------------------------------- (90) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4), >'(S(0), S(z0))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4), >'(S(0), S(z0))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2 ---------------------------------------- (91) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID)) Split RHS of tuples not part of any SCC ---------------------------------------- (92) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (93) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) We considered the (Usable) Rules: >(S(z0), 0) -> True >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(<(x_1, x_2)) = [1] POL(<'(x_1, x_2)) = 0 POL(>(x_1, x_2)) = [1] POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = 0 POL(False) = 0 POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = [1] POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_1 + x_2 POL(QUICKSORT(x_1)) = [1] POL(S(x_1)) = 0 POL(True) = [1] POL(app(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1)) = x_1 POL(c1(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1)) = x_1 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = [1] + x_1 + x_4 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(quicksort(x_1)) = x_1 ---------------------------------------- (94) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (95) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) by PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Nil, Cons(x2, Cons(x3, x4))) -> c12(APP(Nil, part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Nil)) ---------------------------------------- (96) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Nil, Cons(x2, Cons(x3, x4))) -> c12(APP(Nil, part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c12(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (97) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: PART(x0, Nil, Nil, Cons(x2, Cons(x3, x4))) -> c12(APP(Nil, part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Nil)) ---------------------------------------- (98) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (99) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (100) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (101) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) by PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Nil, Cons(x2, Nil)) -> c12(APP(Nil, Cons(x2, Nil)), QUICKSORT(Nil)) ---------------------------------------- (102) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Nil, Cons(x2, Nil)) -> c12(APP(Nil, Cons(x2, Nil)), QUICKSORT(Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c12(APP(quicksort(x1), Cons(z0, Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (103) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: PART(x0, Nil, Nil, Cons(x2, Nil)) -> c12(APP(Nil, Cons(x2, Nil)), QUICKSORT(Nil)) ---------------------------------------- (104) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (105) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (106) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (107) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(x0, Nil, x1, Nil) -> c12(APP(quicksort(x1), Nil), QUICKSORT(x1)) by PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Nil, Nil) -> c12(APP(Nil, Nil), QUICKSORT(Nil)) ---------------------------------------- (108) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Nil, Nil) -> c12(APP(Nil, Nil), QUICKSORT(Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Nil, Nil) -> c12(APP(Nil, Nil), QUICKSORT(Nil)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (109) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: PART(x0, Nil, Nil, Nil) -> c12(APP(Nil, Nil), QUICKSORT(Nil)) ---------------------------------------- (110) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil), QUICKSORT(Cons(z0, Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil), QUICKSORT(Cons(z0, Nil))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (111) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (112) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (113) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) We considered the (Usable) Rules: >(S(z0), 0) -> True >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(<(x_1, x_2)) = [3] + [3]x_1 + [3]x_2 POL(<'(x_1, x_2)) = 0 POL(>(x_1, x_2)) = [1] POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = 0 POL(False) = 0 POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = [1] POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_1 + x_2 POL(QUICKSORT(x_1)) = [1] POL(S(x_1)) = 0 POL(True) = [1] POL(app(x_1, x_2)) = [3] + [3]x_1 + [3]x_2 POL(c(x_1)) = x_1 POL(c1(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1)) = x_1 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = 0 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [3] + [2]x_2 + [3]x_3 + [3]x_4 + [3]x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [3] + x_2 + x_4 + x_5 POL(quicksort(x_1)) = 0 ---------------------------------------- (114) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_2, c12_1, c13_2, c13_1, c11_2, c1_1 ---------------------------------------- (115) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(Cons(z0, Cons(z1, z2)))) by PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) ---------------------------------------- (116) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c13_1, c11_2, c1_1, c12_2 ---------------------------------------- (117) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) We considered the (Usable) Rules:none And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(<(x_1, x_2)) = [3] + [3]x_1 + [3]x_2 POL(<'(x_1, x_2)) = 0 POL(>(x_1, x_2)) = 0 POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = [1] POL(False) = 0 POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = x_4 POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_5 POL(QUICKSORT(x_1)) = 0 POL(S(x_1)) = 0 POL(True) = 0 POL(app(x_1, x_2)) = [3] + [3]x_1 + [3]x_2 POL(c(x_1)) = x_1 POL(c1(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1)) = x_1 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = 0 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = 0 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [3] + x_2 + x_4 + x_5 POL(quicksort(x_1)) = [3]x_1 ---------------------------------------- (118) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c13_1, c11_2, c1_1, c12_2 ---------------------------------------- (119) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) by PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Nil, Cons(x2, Cons(x3, x4))) -> c13(APP(Nil, part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) ---------------------------------------- (120) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Nil, Cons(x2, Cons(x3, x4))) -> c13(APP(Nil, part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c13_1, c11_2, c1_1, c12_2 ---------------------------------------- (121) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (122) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Nil, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Cons(z1, z2))) -> c13(APP(quicksort(x1), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c13_1, c11_2, c1_1, c12_2 ---------------------------------------- (123) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: PART(x0, Nil, Nil, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) ---------------------------------------- (124) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c13_1, c11_2, c1_1, c12_2 ---------------------------------------- (125) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(x0, Nil, Cons(z0, Cons(z1, z2)), x2) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), quicksort(x2)), QUICKSORT(x2)) by PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil), QUICKSORT(Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) ---------------------------------------- (126) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil), QUICKSORT(Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil)), QUICKSORT(Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil), QUICKSORT(Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c13_1, c11_2, c1_1, c12_2 ---------------------------------------- (127) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing tuple parts ---------------------------------------- (128) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c13_1, c11_2, c1_1, c12_2 ---------------------------------------- (129) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) We considered the (Usable) Rules:none And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(<(x_1, x_2)) = [1] POL(<'(x_1, x_2)) = 0 POL(>(x_1, x_2)) = x_1 + x_2 POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = [1] POL(False) = [1] POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = x_4 POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_5 POL(QUICKSORT(x_1)) = 0 POL(S(x_1)) = [1] POL(True) = [1] POL(app(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1)) = x_1 POL(c1(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1)) = x_1 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = [1] + x_1 + x_4 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_2 + x_3 + x_4 + x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(quicksort(x_1)) = 0 ---------------------------------------- (130) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c13_1, c11_2, c1_1, c12_2 ---------------------------------------- (131) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) We considered the (Usable) Rules:none And the Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(<(x_1, x_2)) = [1] POL(<'(x_1, x_2)) = [1] POL(>(x_1, x_2)) = x_1 + x_2 POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = 0 POL(False) = [1] POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = [1] POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = [1] + x_3 POL(QUICKSORT(x_1)) = [1] POL(S(x_1)) = [1] POL(True) = [1] POL(app(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1)) = x_1 POL(c1(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1)) = x_1 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = [1] + x_1 + x_4 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_2 + x_3 + x_4 + x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(quicksort(x_1)) = 0 ---------------------------------------- (132) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c13_1, c11_2, c1_1, c12_2 ---------------------------------------- (133) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) by PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Nil, Cons(x2, Nil)) -> c13(APP(Nil, Cons(x2, Nil))) ---------------------------------------- (134) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Nil, Cons(x2, Nil)) -> c13(APP(Nil, Cons(x2, Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Cons(z0, Nil)) -> c13(APP(quicksort(x1), Cons(z0, Nil))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c13_1, c11_2, c1_1, c12_2 ---------------------------------------- (135) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: PART(x0, Nil, Nil, Cons(x2, Nil)) -> c13(APP(Nil, Cons(x2, Nil))) ---------------------------------------- (136) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c13_1, c11_2, c1_1, c12_2 ---------------------------------------- (137) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) by PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Nil, Nil) -> c13(APP(Nil, Nil)) ---------------------------------------- (138) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Nil, Nil) -> c13(APP(Nil, Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, x1, Nil) -> c13(APP(quicksort(x1), Nil)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c11_2, c1_1, c12_2, c13_1 ---------------------------------------- (139) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: PART(x0, Nil, Nil, Nil) -> c13(APP(Nil, Nil)) ---------------------------------------- (140) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c6_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c11_2, c1_1, c12_2, c13_1 ---------------------------------------- (141) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART[ITE][TRUE][ITE](True, z0, Cons(z1, z2), z3, z4) -> c6(PART(z0, z2, Cons(z1, z3), z4)) by PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) ---------------------------------------- (142) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, PART[ITE][TRUE][ITE]_5, QUICKSORT_1, APP_2, PART_4 Compound Symbols: c_1, c3_1, c7_1, c8_1, c14_1, c11_1, c12_1, c13_2, c11_2, c1_1, c12_2, c13_1, c6_1 ---------------------------------------- (143) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART[ITE][TRUE][ITE](False, z0, Cons(z1, z2), z3, z4) -> c7(<'(z0, z1)) by PART[ITE][TRUE][ITE](False, 0, Cons(x0, x1), x2, x3) -> c7(<'(0, x0)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART[ITE][TRUE][ITE](False, S(0), Cons(S(x0), x1), x2, x3) -> c7(<'(S(0), S(x0))) ---------------------------------------- (144) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, 0, Cons(x0, x1), x2, x3) -> c7(<'(0, x0)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART[ITE][TRUE][ITE](False, S(0), Cons(S(x0), x1), x2, x3) -> c7(<'(S(0), S(x0))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) K tuples: PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5 Compound Symbols: c_1, c3_1, c8_1, c14_1, c11_1, c12_1, c13_2, c11_2, c1_1, c12_2, c13_1, c6_1, c7_1 ---------------------------------------- (145) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing nodes: PART[ITE][TRUE][ITE](False, 0, Cons(x0, x1), x2, x3) -> c7(<'(0, x0)) PART(0, Cons(z0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](False, 0, Cons(z0, x2), x3, x4)) ---------------------------------------- (146) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART[ITE][TRUE][ITE](False, S(0), Cons(S(x0), x1), x2, x3) -> c7(<'(S(0), S(x0))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) K tuples: PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5 Compound Symbols: c_1, c3_1, c8_1, c14_1, c11_1, c12_1, c13_2, c11_2, c1_1, c12_2, c13_1, c6_1, c7_1 ---------------------------------------- (147) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(S(z0), Cons(0, x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(z0), Cons(0, x2), x3, x4)) by PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) ---------------------------------------- (148) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART[ITE][TRUE][ITE](False, S(0), Cons(S(x0), x1), x2, x3) -> c7(<'(S(0), S(x0))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) K tuples: PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5 Compound Symbols: c_1, c3_1, c8_1, c14_1, c12_1, c13_2, c11_2, c11_1, c1_1, c12_2, c13_1, c6_1, c7_1 ---------------------------------------- (149) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(x0, Nil, Cons(z0, Nil), x2) -> c12(APP(Cons(z0, Nil), quicksort(x2))) by PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) ---------------------------------------- (150) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART[ITE][TRUE][ITE](False, S(0), Cons(S(x0), x1), x2, x3) -> c7(<'(S(0), S(x0))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5 Compound Symbols: c_1, c3_1, c8_1, c14_1, c13_2, c11_2, c11_1, c1_1, c12_2, c12_1, c13_1, c6_1, c7_1 ---------------------------------------- (151) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) ---------------------------------------- (152) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART[ITE][TRUE][ITE](False, S(0), Cons(S(x0), x1), x2, x3) -> c7(<'(S(0), S(x0))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5 Compound Symbols: c_1, c3_1, c8_1, c14_1, c13_2, c11_2, c11_1, c1_1, c12_2, c12_1, c13_1, c6_1, c7_1 ---------------------------------------- (153) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(x0, Nil, Cons(z0, Nil), x2) -> c13(APP(Cons(z0, Nil), quicksort(x2)), QUICKSORT(x2)) by PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) ---------------------------------------- (154) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: <'(S(z0), S(z1)) -> c(<'(z0, z1)) >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART[ITE][TRUE][ITE](False, S(0), Cons(S(x0), x1), x2, x3) -> c7(<'(S(0), S(x0))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: <'_2, >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5 Compound Symbols: c_1, c3_1, c8_1, c14_1, c11_2, c11_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1 ---------------------------------------- (155) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace <'(S(z0), S(z1)) -> c(<'(z0, z1)) by <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) ---------------------------------------- (156) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART[ITE][TRUE][ITE](False, S(0), Cons(S(x0), x1), x2, x3) -> c7(<'(S(0), S(x0))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c11_2, c11_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c_1 ---------------------------------------- (157) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing nodes: PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(PART[ITE][TRUE][ITE](False, S(0), Cons(S(z0), x2), x3, x4)) PART[ITE][TRUE][ITE](False, S(0), Cons(S(x0), x1), x2, x3) -> c7(<'(S(0), S(x0))) ---------------------------------------- (158) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c11_2, c11_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c_1 ---------------------------------------- (159) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(S(S(z0)), Cons(S(S(z1)), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), x2), x3, x4), >'(S(S(z0)), S(S(z1)))) by PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) ---------------------------------------- (160) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c11_2, c11_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c_1 ---------------------------------------- (161) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c12(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil))) by PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) ---------------------------------------- (162) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c11_2, c11_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c_1 ---------------------------------------- (163) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(S(S(z0)), Cons(S(0), x2), x3, x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), x2), x3, x4), >'(S(S(z0)), S(0))) by PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) ---------------------------------------- (164) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c11_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c_1, c11_2 ---------------------------------------- (165) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) We considered the (Usable) Rules:none And the Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(<(x_1, x_2)) = [1] POL(<'(x_1, x_2)) = 0 POL(>(x_1, x_2)) = x_1 POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = x_1 POL(False) = [1] POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = x_3 + x_4 POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_2 + x_5 POL(QUICKSORT(x_1)) = x_1 POL(S(x_1)) = [1] POL(True) = 0 POL(app(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1)) = x_1 POL(c1(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1)) = x_1 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = x_1 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_3 + x_4 + x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(quicksort(x_1)) = x_1 ---------------------------------------- (166) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c11_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c_1, c11_2 ---------------------------------------- (167) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) We considered the (Usable) Rules: >(S(z0), 0) -> True >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False And the Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(<(x_1, x_2)) = [1] POL(<'(x_1, x_2)) = x_1 + x_2 POL(>(x_1, x_2)) = [1] POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = [1] POL(False) = 0 POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = x_3 + x_4 POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_1 + x_2 + x_5 POL(QUICKSORT(x_1)) = x_1 POL(S(x_1)) = 0 POL(True) = [1] POL(app(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1)) = x_1 POL(c1(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1)) = x_1 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = x_1 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_3 + x_4 + x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(quicksort(x_1)) = x_1 ---------------------------------------- (168) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c11_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c_1, c11_2 ---------------------------------------- (169) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) ---------------------------------------- (170) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c11_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c_1, c11_2 ---------------------------------------- (171) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) ---------------------------------------- (172) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c11_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c_1, c11_2 ---------------------------------------- (173) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(S(x0), Cons(S(x1), x2), x3, x4) -> c11(>'(S(x0), S(x1))) by PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) ---------------------------------------- (174) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2 ---------------------------------------- (175) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) ---------------------------------------- (176) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2 ---------------------------------------- (177) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil)), QUICKSORT(Cons(x1, Cons(x2, x3)))) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) ---------------------------------------- (178) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2 ---------------------------------------- (179) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c12(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil), QUICKSORT(Cons(x1, Cons(x2, x3)))) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) ---------------------------------------- (180) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c1_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2 ---------------------------------------- (181) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(S(0), Cons(S(z0), x2), x3, x4) -> c1(>'(S(0), S(z0))) by PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) ---------------------------------------- (182) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c1_1 ---------------------------------------- (183) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) ---------------------------------------- (184) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c1_1 ---------------------------------------- (185) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c12(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(x1)) by PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) ---------------------------------------- (186) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c12_1, c12_2, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c1_1 ---------------------------------------- (187) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(z0, Nil), Cons(x2, Cons(x3, x4))) -> c13(APP(Cons(z0, Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) by PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) ---------------------------------------- (188) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c12_1, c12_2, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c1_1 ---------------------------------------- (189) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c12(APP(Cons(z0, Nil), Cons(x2, Nil))) by PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) ---------------------------------------- (190) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c12_1, c12_2, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c1_1 ---------------------------------------- (191) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Cons(z1, z2))) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) ---------------------------------------- (192) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c12_1, c12_2, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c1_1 ---------------------------------------- (193) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) ---------------------------------------- (194) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c12_1, c12_2, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c1_1 ---------------------------------------- (195) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(x0, Nil, Cons(z0, Nil), Nil) -> c12(APP(Cons(z0, Nil), Nil)) by PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) ---------------------------------------- (196) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: >'(S(z0), S(z1)) -> c3(>'(z0, z1)) QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: >'_2, QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2 Compound Symbols: c3_1, c8_1, c14_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c1_1 ---------------------------------------- (197) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace >'(S(z0), S(z1)) -> c3(>'(z0, z1)) by >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) ---------------------------------------- (198) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c12(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil)), QUICKSORT(Cons(z0, Cons(z1, z2)))) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Cons(x3, x4))) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), part(x2, Cons(x2, Cons(x3, x4)), Cons(x2, Nil), Nil)), QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2 Compound Symbols: c8_1, c14_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c1_1, c3_1 ---------------------------------------- (199) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing nodes: PART(S(0), Cons(S(z0), z1), Cons(0, x2), x3) -> c1(>'(S(0), S(z0))) PART(S(0), Cons(S(0), Cons(x1, x2)), Cons(S(0), Nil), Nil) -> c1(>'(S(0), S(0))) ---------------------------------------- (200) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3), >'(S(S(z0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(0))) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3), >'(S(S(x0)), S(0))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2 Compound Symbols: c8_1, c14_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c3_1 ---------------------------------------- (201) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing tuple parts ---------------------------------------- (202) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) K tuples: PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2 Compound Symbols: c8_1, c14_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c3_1 ---------------------------------------- (203) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) ---------------------------------------- (204) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) K tuples: PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2 Compound Symbols: c8_1, c14_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c3_1 ---------------------------------------- (205) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(z0, Cons(z1, z2)), Cons(x2, Nil)) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Cons(x2, Nil))) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) ---------------------------------------- (206) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) K tuples: PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2 Compound Symbols: c8_1, c14_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c3_1 ---------------------------------------- (207) CdtRewritingProof (BOTH BOUNDS(ID, ID)) Used rewriting to replace PART(x0, Nil, Cons(z0, Cons(z1, z2)), Nil) -> c13(APP(part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil), Nil)) by PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) ---------------------------------------- (208) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) K tuples: PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2 Compound Symbols: c8_1, c14_1, c12_2, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c_1, c11_2, c3_1 ---------------------------------------- (209) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c12(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(Cons(z0, Cons(x2, x3)))) by PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3)), QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) ---------------------------------------- (210) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3)), QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3)), QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2 Compound Symbols: c8_1, c14_1, c12_1, c13_2, c13_1, c6_1, c7_1, c11_1, c12_2, c_1, c11_2, c3_1 ---------------------------------------- (211) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(x0, Nil, Cons(x1, Cons(x2, x3)), x4) -> c12(QUICKSORT(Cons(x1, Cons(x2, x3)))) by PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) ---------------------------------------- (212) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3)), QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) S tuples: QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3)), QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) K tuples: PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: QUICKSORT_1, APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2 Compound Symbols: c8_1, c14_1, c13_2, c13_1, c6_1, c7_1, c11_1, c12_1, c12_2, c_1, c11_2, c3_1 ---------------------------------------- (213) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace QUICKSORT(Cons(z0, Cons(z1, z2))) -> c8(PART(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil)) by QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) ---------------------------------------- (214) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(0, x2))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3)), QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) S tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3)), QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(0, Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) K tuples: PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2, QUICKSORT_1 Compound Symbols: c14_1, c13_2, c13_1, c6_1, c7_1, c11_1, c12_1, c12_2, c_1, c11_2, c3_1, c8_1 ---------------------------------------- (215) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing tuple parts ---------------------------------------- (216) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12 S tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12 K tuples: PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2, QUICKSORT_1 Compound Symbols: c14_1, c13_2, c13_1, c6_1, c7_1, c11_1, c12_1, c12_2, c_1, c11_2, c3_1, c8_1, c12 ---------------------------------------- (217) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12 We considered the (Usable) Rules: >(S(z0), 0) -> True >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False And the Tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12 The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [1] POL(<(x_1, x_2)) = [1] POL(<'(x_1, x_2)) = 0 POL(>(x_1, x_2)) = [1] POL(>'(x_1, x_2)) = 0 POL(APP(x_1, x_2)) = 0 POL(Cons(x_1, x_2)) = x_1 POL(False) = 0 POL(Nil) = 0 POL(PART(x_1, x_2, x_3, x_4)) = x_3 + x_4 POL(PART[ITE][TRUE][ITE](x_1, x_2, x_3, x_4, x_5)) = x_1 + x_5 POL(QUICKSORT(x_1)) = x_1 POL(S(x_1)) = [1] POL(True) = [1] POL(app(x_1, x_2)) = [1] + x_1 + x_2 POL(c(x_1)) = x_1 POL(c11(x_1)) = x_1 POL(c11(x_1, x_2)) = x_1 + x_2 POL(c12) = 0 POL(c12(x_1)) = x_1 POL(c12(x_1, x_2)) = x_1 + x_2 POL(c13(x_1)) = x_1 POL(c13(x_1, x_2)) = x_1 + x_2 POL(c14(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(c8(x_1)) = x_1 POL(part(x_1, x_2, x_3, x_4)) = [1] + x_1 + x_4 POL(part[Ite][True][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_3 + x_4 + x_5 POL(part[Ite][True][Ite][False][Ite](x_1, x_2, x_3, x_4, x_5)) = [1] + x_1 + x_2 + x_3 + x_4 + x_5 POL(quicksort(x_1)) = 0 ---------------------------------------- (218) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12 S tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) K tuples: PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12 Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2, QUICKSORT_1 Compound Symbols: c14_1, c13_2, c13_1, c6_1, c7_1, c11_1, c12_1, c12_2, c_1, c11_2, c3_1, c8_1, c12 ---------------------------------------- (219) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(x0, Nil, x1, Cons(z0, Cons(x3, x4))) -> c13(APP(quicksort(x1), part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x3, x4)), Cons(z0, Nil), Nil)), QUICKSORT(Cons(z0, Cons(x3, x4)))) by PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) ---------------------------------------- (220) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12 PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) S tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) K tuples: PART(x0, Nil, Cons(x1, Cons(x2, x3)), Cons(z0, Nil)) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Cons(z0, Nil))) PART(x0, Nil, Cons(x1, Cons(x2, x3)), Nil) -> c13(APP(part(x1, Cons(x1, Cons(x2, x3)), Cons(x1, Nil), Nil), Nil)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12 Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2, QUICKSORT_1 Compound Symbols: c14_1, c13_1, c13_2, c6_1, c7_1, c11_1, c12_1, c12_2, c_1, c11_2, c3_1, c8_1, c12 ---------------------------------------- (221) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12 ---------------------------------------- (222) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) S tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) K tuples: PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2, QUICKSORT_1 Compound Symbols: c14_1, c13_1, c13_2, c6_1, c7_1, c11_1, c12_1, c12_2, c_1, c11_2, c3_1, c8_1 ---------------------------------------- (223) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(x0, Nil, x1, Cons(x2, Cons(x3, x4))) -> c13(QUICKSORT(Cons(x2, Cons(x3, x4)))) by PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c13(QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c13(QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c13(QUICKSORT(Cons(z2, Cons(z3, z4)))) ---------------------------------------- (224) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c13(QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c13(QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c13(QUICKSORT(Cons(z2, Cons(z3, z4)))) S tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) K tuples: PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2, QUICKSORT_1 Compound Symbols: c14_1, c13_2, c13_1, c6_1, c7_1, c11_1, c12_1, c12_2, c_1, c11_2, c3_1, c8_1 ---------------------------------------- (225) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace PART(x0, Nil, Cons(z0, Cons(x2, x3)), x4) -> c13(APP(part[Ite][True][Ite](>(z0, z0), z0, Cons(z0, Cons(x2, x3)), Cons(z0, Nil), Nil), quicksort(x4)), QUICKSORT(x4)) by PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c13(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c13(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c13(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(x3)) ---------------------------------------- (226) Obligation: Complexity Dependency Tuples Problem Rules: >(S(z0), S(z1)) -> >(z0, z1) >(0, z0) -> False >(S(z0), 0) -> True quicksort(Cons(z0, Cons(z1, z2))) -> part(z0, Cons(z0, Cons(z1, z2)), Cons(z0, Nil), Nil) quicksort(Cons(z0, Nil)) -> Cons(z0, Nil) quicksort(Nil) -> Nil part(z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite](>(z0, z1), z0, Cons(z1, z2), z3, z4) part(z0, Nil, z1, z2) -> app(quicksort(z1), quicksort(z2)) part[Ite][True][Ite](True, z0, Cons(z1, z2), z3, z4) -> part(z0, z2, Cons(z1, z3), z4) part[Ite][True][Ite](False, z0, Cons(z1, z2), z3, z4) -> part[Ite][True][Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2), z3, z4) app(Cons(z0, z1), z2) -> Cons(z0, app(z1, z2)) app(Nil, z0) -> z0 <(S(z0), S(z1)) -> <(z0, z1) <(0, S(z0)) -> True <(z0, 0) -> False Tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(x0, Nil, Cons(z0, Nil), Cons(x2, Nil)) -> c13(APP(Cons(z0, Nil), Cons(x2, Nil))) PART(x0, Nil, Cons(z0, Nil), Nil) -> c13(APP(Cons(z0, Nil), Nil)) PART[ITE][TRUE][ITE](True, S(x0), Cons(0, x1), x2, x3) -> c6(PART(S(x0), x1, Cons(0, x2), x3)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c6(PART(S(S(x0)), x2, Cons(S(S(x1)), x3), x4)) PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), x1), x2, x3) -> c6(PART(S(S(x0)), x1, Cons(S(0), x2), x3)) PART[ITE][TRUE][ITE](False, S(S(x0)), Cons(S(S(x1)), x2), x3, x4) -> c7(<'(S(S(x0)), S(S(x1)))) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c12(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) <'(S(S(y0)), S(S(y1))) -> c(<'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c12(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil)), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Cons(z5, z6))) -> c13(APP(part(z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), part[Ite][True][Ite](>(z4, z4), z4, Cons(z4, Cons(z5, z6)), Cons(z4, Nil), Nil)), QUICKSORT(Cons(z4, Cons(z5, z6)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(S(x1)), x3))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(S(0), x2))) PART(z0, Nil, Cons(z1, Nil), Cons(z2, Cons(z3, z4))) -> c13(APP(Cons(z1, Nil), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Nil), Cons(z2, Nil)) -> c12(APP(Cons(0, Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(S(x1)), Nil), Cons(z2, Nil))) PART(S(S(x0)), Nil, Cons(S(0), Nil), Cons(z2, Nil)) -> c12(APP(Cons(S(0), Nil), Cons(z2, Nil))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Cons(z4, Nil)) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Cons(z4, Nil))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) >'(S(S(y0)), S(S(y1))) -> c3(>'(S(y0), S(y1))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c13(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c12(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(0, x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(S(S(x1)), x3)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c13(APP(quicksort(Cons(S(0), x2)), part[Ite][True][Ite](>(z2, z2), z2, Cons(z2, Cons(z3, z4)), Cons(z2, Nil), Nil)), QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, x2), Cons(z2, Cons(z3, z4))) -> c13(QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), x3), Cons(z2, Cons(z3, z4))) -> c13(QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(S(x0)), Nil, Cons(S(0), x2), Cons(z2, Cons(z3, z4))) -> c13(QUICKSORT(Cons(z2, Cons(z3, z4)))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c13(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c13(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c13(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(x3)) S tuples: APP(Cons(z0, z1), z2) -> c14(APP(z1, z2)) PART(S(x0), Cons(0, z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(x0), Cons(0, z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(0, z1), Cons(S(0), x2), x3)) PART(S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil) -> c11(PART[ITE][TRUE][ITE](>(z0, z0), S(S(z0)), Cons(S(S(z0)), Cons(x1, x2)), Cons(S(S(z0)), Nil), Nil), >'(S(S(z0)), S(S(z0)))) PART(S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](>(z0, z1), S(S(z0)), Cons(S(S(z1)), z2), Cons(0, x2), x3), >'(S(S(z0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(S(x1)), x3), x4), >'(S(S(x0)), S(S(z1)))) PART(S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](>(x0, z1), S(S(x0)), Cons(S(S(z1)), z2), Cons(S(0), x2), x3), >'(S(S(x0)), S(S(z1)))) PART(z0, Nil, Cons(z1, Cons(z2, z3)), Nil) -> c12(APP(part[Ite][True][Ite](>(z1, z1), z1, Cons(z1, Cons(z2, z3)), Cons(z1, Nil), Nil), Nil), QUICKSORT(Cons(z1, Cons(z2, z3)))) PART(S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(z0)), Cons(S(0), z1), Cons(0, x2), x3)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(S(x1)), x3), x4)) PART(S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3) -> c11(PART[ITE][TRUE][ITE](True, S(S(x0)), Cons(S(0), z1), Cons(S(0), x2), x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(Cons(S(0), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c12(QUICKSORT(Cons(S(S(x1)), Cons(z2, z3)))) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c12(QUICKSORT(Cons(S(0), Cons(z2, z3)))) QUICKSORT(Cons(S(S(y0)), Cons(z1, z2))) -> c8(PART(S(S(y0)), Cons(S(S(y0)), Cons(z1, z2)), Cons(S(S(y0)), Nil), Nil)) QUICKSORT(Cons(S(y0), Cons(z1, z2))) -> c8(PART(S(y0), Cons(S(y0), Cons(z1, z2)), Cons(S(y0), Nil), Nil)) K tuples: PART(S(x0), Nil, Cons(0, Nil), x3) -> c12(APP(Cons(0, Nil), quicksort(x3))) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c12(APP(Cons(S(S(x1)), Nil), quicksort(x4))) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c12(APP(Cons(S(0), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Nil), x3) -> c13(APP(Cons(0, Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), x4) -> c13(APP(Cons(S(S(x1)), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Nil), x3) -> c13(APP(Cons(S(0), Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(z0), Cons(S(z0), Cons(x1, x2)), Cons(S(z0), Nil), Nil) -> c11(>'(S(z0), S(z0))) PART(S(x0), Cons(S(z1), z2), Cons(0, x2), x3) -> c11(>'(S(x0), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(S(x1)), x3), x4) -> c11(>'(S(S(x0)), S(z1))) PART(S(S(x0)), Cons(S(z1), z2), Cons(S(0), x2), x3) -> c11(>'(S(S(x0)), S(z1))) PART(S(x0), Nil, Cons(0, Nil), Nil) -> c12(APP(Cons(0, Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Nil), Nil) -> c12(APP(Cons(S(S(x1)), Nil), Nil)) PART(S(S(x0)), Nil, Cons(S(0), Nil), Nil) -> c12(APP(Cons(S(0), Nil), Nil)) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c12(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3))) PART(S(x0), Nil, Cons(0, Cons(z2, z3)), x3) -> c13(APP(part[Ite][True][Ite](>(0, 0), 0, Cons(0, Cons(z2, z3)), Cons(0, Nil), Nil), quicksort(x3)), QUICKSORT(x3)) PART(S(S(x0)), Nil, Cons(S(S(x1)), Cons(z2, z3)), x4) -> c13(APP(part[Ite][True][Ite](>(S(S(x1)), S(S(x1))), S(S(x1)), Cons(S(S(x1)), Cons(z2, z3)), Cons(S(S(x1)), Nil), Nil), quicksort(x4)), QUICKSORT(x4)) PART(S(S(x0)), Nil, Cons(S(0), Cons(z2, z3)), x3) -> c13(APP(part[Ite][True][Ite](>(S(0), S(0)), S(0), Cons(S(0), Cons(z2, z3)), Cons(S(0), Nil), Nil), quicksort(x3)), QUICKSORT(x3)) Defined Rule Symbols: >_2, quicksort_1, part_4, part[Ite][True][Ite]_5, app_2, <_2 Defined Pair Symbols: APP_2, PART_4, PART[ITE][TRUE][ITE]_5, <'_2, >'_2, QUICKSORT_1 Compound Symbols: c14_1, c13_1, c6_1, c7_1, c11_1, c12_1, c12_2, c13_2, c_1, c11_2, c3_1, c8_1