KILLED proof of input_fN1dRYLMZv.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). (0) CpxTRS (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (4) CpxTRS (5) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (6) CpxWeightedTrs (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedTrs (9) CompletionProof [UPPER BOUND(ID), 0 ms] (10) CpxTypedWeightedCompleteTrs (11) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTypedWeightedCompleteTrs (13) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (14) CpxRNTS (15) InliningProof [UPPER BOUND(ID), 517 ms] (16) CpxRNTS (17) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRNTS (19) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 175 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 6 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 70 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 5 ms] (32) CpxRNTS (33) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 203 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 74 ms] (38) CpxRNTS (39) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 90 ms] (42) CpxRNTS (43) IntTrsBoundProof [UPPER BOUND(ID), 53 ms] (44) CpxRNTS (45) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (46) CpxRNTS (47) IntTrsBoundProof [UPPER BOUND(ID), 99 ms] (48) CpxRNTS (49) IntTrsBoundProof [UPPER BOUND(ID), 5 ms] (50) CpxRNTS (51) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (52) CpxRNTS (53) IntTrsBoundProof [UPPER BOUND(ID), 230 ms] (54) CpxRNTS (55) IntTrsBoundProof [UPPER BOUND(ID), 73 ms] (56) CpxRNTS (57) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (58) CpxRNTS (59) IntTrsBoundProof [UPPER BOUND(ID), 25.3 s] (60) CpxRNTS (61) IntTrsBoundProof [UPPER BOUND(ID), 10.4 s] (62) CpxRNTS (63) CompletionProof [UPPER BOUND(ID), 0 ms] (64) CpxTypedWeightedCompleteTrs (65) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (66) CpxRNTS (67) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (68) CdtProblem (69) CdtLeafRemovalProof [ComplexityIfPolyImplication, 0 ms] (70) CdtProblem (71) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (72) CdtProblem (73) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (74) CdtProblem (75) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (76) CdtProblem (77) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (78) CdtProblem (79) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 77 ms] (80) CdtProblem (81) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (82) CdtProblem (83) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (84) CdtProblem (85) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (86) CdtProblem (87) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (88) CdtProblem (89) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (90) CdtProblem (91) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (92) CdtProblem (93) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (94) CdtProblem (95) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (96) CdtProblem (97) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (98) CdtProblem (99) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (100) CdtProblem (101) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (102) CdtProblem (103) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (104) CdtProblem (105) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 136 ms] (106) CdtProblem (107) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (108) CdtProblem (109) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (110) CdtProblem (111) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (112) CdtProblem (113) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (114) CdtProblem (115) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (116) CdtProblem (117) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (118) CdtProblem (119) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (120) CdtProblem (121) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (122) CdtProblem (123) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (124) CdtProblem (125) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (126) CdtProblem (127) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 3 ms] (128) CdtProblem (129) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (130) CdtProblem (131) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (132) CdtProblem (133) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (134) CdtProblem (135) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (136) CdtProblem (137) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (138) CdtProblem (139) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (140) CdtProblem (141) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (142) CdtProblem (143) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (144) CdtProblem (145) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (146) CdtProblem (147) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (148) CdtProblem (149) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (150) CdtProblem (151) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (152) CdtProblem (153) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (154) CdtProblem (155) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (156) CdtProblem (157) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (158) CdtProblem (159) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (160) CdtProblem (161) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (162) CdtProblem (163) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (164) CdtProblem (165) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (166) CdtProblem (167) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (168) CdtProblem (169) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (170) CdtProblem (171) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (172) CdtProblem (173) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (174) CdtProblem (175) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (176) CdtProblem (177) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (178) CdtProblem (179) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (180) CdtProblem (181) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (182) CdtProblem (183) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (184) CdtProblem (185) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (186) CdtProblem (187) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (188) CdtProblem (189) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (190) CdtProblem (191) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (192) CdtProblem (193) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (194) CdtProblem (195) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (196) CdtProblem (197) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (198) CdtProblem (199) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (200) CdtProblem (201) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (202) CdtProblem (203) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (204) CdtProblem (205) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (206) CdtProblem (207) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (208) CdtProblem (209) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (210) CdtProblem (211) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (212) CdtProblem (213) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 10 ms] (214) CdtProblem (215) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (216) CdtProblem (217) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (218) CdtProblem ---------------------------------------- (0) 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: isEmpty(cons(x, xs)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(x)) -> false head(cons(x, xs)) -> x tail(cons(x, xs)) -> xs tail(nil) -> nil p(s(s(x))) -> s(p(s(x))) p(s(0)) -> 0 p(0) -> 0 inc(s(x)) -> s(inc(x)) inc(0) -> s(0) sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) if(true, b, y, xs, ys, x) -> y if(false, true, y, xs, ys, x) -> sumList(xs, y) if(false, false, y, xs, ys, x) -> sumList(ys, x) sum(xs) -> sumList(xs, 0) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (2) 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: isEmpty(cons(x, xs)) -> false isEmpty(nil) -> true isZero(0') -> true isZero(s(x)) -> false head(cons(x, xs)) -> x tail(cons(x, xs)) -> xs tail(nil) -> nil p(s(s(x))) -> s(p(s(x))) p(s(0')) -> 0' p(0') -> 0' inc(s(x)) -> s(inc(x)) inc(0') -> s(0') sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) if(true, b, y, xs, ys, x) -> y if(false, true, y, xs, ys, x) -> sumList(xs, y) if(false, false, y, xs, ys, x) -> sumList(ys, x) sum(xs) -> sumList(xs, 0') S is empty. 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: isEmpty(cons(x, xs)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(x)) -> false head(cons(x, xs)) -> x tail(cons(x, xs)) -> xs tail(nil) -> nil p(s(s(x))) -> s(p(s(x))) p(s(0)) -> 0 p(0) -> 0 inc(s(x)) -> s(inc(x)) inc(0) -> s(0) sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) if(true, b, y, xs, ys, x) -> y if(false, true, y, xs, ys, x) -> sumList(xs, y) if(false, false, y, xs, ys, x) -> sumList(ys, x) sum(xs) -> sumList(xs, 0) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (5) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (6) 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: isEmpty(cons(x, xs)) -> false [1] isEmpty(nil) -> true [1] isZero(0) -> true [1] isZero(s(x)) -> false [1] head(cons(x, xs)) -> x [1] tail(cons(x, xs)) -> xs [1] tail(nil) -> nil [1] p(s(s(x))) -> s(p(s(x))) [1] p(s(0)) -> 0 [1] p(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] inc(0) -> s(0) [1] sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) [1] if(true, b, y, xs, ys, x) -> y [1] if(false, true, y, xs, ys, x) -> sumList(xs, y) [1] if(false, false, y, xs, ys, x) -> sumList(ys, x) [1] sum(xs) -> sumList(xs, 0) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: isEmpty(cons(x, xs)) -> false [1] isEmpty(nil) -> true [1] isZero(0) -> true [1] isZero(s(x)) -> false [1] head(cons(x, xs)) -> x [1] tail(cons(x, xs)) -> xs [1] tail(nil) -> nil [1] p(s(s(x))) -> s(p(s(x))) [1] p(s(0)) -> 0 [1] p(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] inc(0) -> s(0) [1] sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) [1] if(true, b, y, xs, ys, x) -> y [1] if(false, true, y, xs, ys, x) -> sumList(xs, y) [1] if(false, false, y, xs, ys, x) -> sumList(ys, x) [1] sum(xs) -> sumList(xs, 0) [1] The TRS has the following type information: isEmpty :: cons:nil -> false:true cons :: 0:s -> cons:nil -> cons:nil false :: false:true nil :: cons:nil true :: false:true isZero :: 0:s -> false:true 0 :: 0:s s :: 0:s -> 0:s head :: cons:nil -> 0:s tail :: cons:nil -> cons:nil p :: 0:s -> 0:s inc :: 0:s -> 0:s sumList :: cons:nil -> 0:s -> 0:s if :: false:true -> false:true -> 0:s -> cons:nil -> cons:nil -> 0:s -> 0:s sum :: cons:nil -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (9) 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: sumList_2 if_6 sum_1 (c) The following functions are completely defined: isEmpty_1 isZero_1 head_1 tail_1 p_1 inc_1 Due to the following rules being added: head(v0) -> 0 [0] And the following fresh constants: none ---------------------------------------- (10) 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: isEmpty(cons(x, xs)) -> false [1] isEmpty(nil) -> true [1] isZero(0) -> true [1] isZero(s(x)) -> false [1] head(cons(x, xs)) -> x [1] tail(cons(x, xs)) -> xs [1] tail(nil) -> nil [1] p(s(s(x))) -> s(p(s(x))) [1] p(s(0)) -> 0 [1] p(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] inc(0) -> s(0) [1] sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) [1] if(true, b, y, xs, ys, x) -> y [1] if(false, true, y, xs, ys, x) -> sumList(xs, y) [1] if(false, false, y, xs, ys, x) -> sumList(ys, x) [1] sum(xs) -> sumList(xs, 0) [1] head(v0) -> 0 [0] The TRS has the following type information: isEmpty :: cons:nil -> false:true cons :: 0:s -> cons:nil -> cons:nil false :: false:true nil :: cons:nil true :: false:true isZero :: 0:s -> false:true 0 :: 0:s s :: 0:s -> 0:s head :: cons:nil -> 0:s tail :: cons:nil -> cons:nil p :: 0:s -> 0:s inc :: 0:s -> 0:s sumList :: cons:nil -> 0:s -> 0:s if :: false:true -> false:true -> 0:s -> cons:nil -> cons:nil -> 0:s -> 0:s sum :: cons:nil -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (11) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (12) 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: isEmpty(cons(x, xs)) -> false [1] isEmpty(nil) -> true [1] isZero(0) -> true [1] isZero(s(x)) -> false [1] head(cons(x, xs)) -> x [1] tail(cons(x, xs)) -> xs [1] tail(nil) -> nil [1] p(s(s(x))) -> s(p(s(x))) [1] p(s(0)) -> 0 [1] p(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] inc(0) -> s(0) [1] sumList(cons(x', xs'), s(x'')) -> if(false, isZero(x'), s(x''), xs', cons(p(x'), xs'), s(inc(x''))) [7] sumList(cons(x', xs'), 0) -> if(false, isZero(x'), 0, xs', cons(p(x'), xs'), s(0)) [7] sumList(cons(x', xs'), s(x1)) -> if(false, isZero(x'), s(x1), xs', cons(p(0), xs'), s(inc(x1))) [6] sumList(cons(x', xs'), 0) -> if(false, isZero(x'), 0, xs', cons(p(0), xs'), s(0)) [6] sumList(cons(x', xs'), s(x2)) -> if(false, isZero(0), s(x2), xs', cons(p(x'), xs'), s(inc(x2))) [6] sumList(cons(x', xs'), 0) -> if(false, isZero(0), 0, xs', cons(p(x'), xs'), s(0)) [6] sumList(cons(x', xs'), s(x3)) -> if(false, isZero(0), s(x3), xs', cons(p(0), xs'), s(inc(x3))) [5] sumList(cons(x', xs'), 0) -> if(false, isZero(0), 0, xs', cons(p(0), xs'), s(0)) [5] sumList(nil, s(x4)) -> if(true, isZero(0), s(x4), nil, cons(p(0), nil), s(inc(x4))) [5] sumList(nil, 0) -> if(true, isZero(0), 0, nil, cons(p(0), nil), s(0)) [5] if(true, b, y, xs, ys, x) -> y [1] if(false, true, y, xs, ys, x) -> sumList(xs, y) [1] if(false, false, y, xs, ys, x) -> sumList(ys, x) [1] sum(xs) -> sumList(xs, 0) [1] head(v0) -> 0 [0] The TRS has the following type information: isEmpty :: cons:nil -> false:true cons :: 0:s -> cons:nil -> cons:nil false :: false:true nil :: cons:nil true :: false:true isZero :: 0:s -> false:true 0 :: 0:s s :: 0:s -> 0:s head :: cons:nil -> 0:s tail :: cons:nil -> cons:nil p :: 0:s -> 0:s inc :: 0:s -> 0:s sumList :: cons:nil -> 0:s -> 0:s if :: false:true -> false:true -> 0:s -> cons:nil -> cons:nil -> 0:s -> 0:s sum :: cons:nil -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (13) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: false => 0 nil => 0 true => 1 0 => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 if(z, z', z'', z1, z2, z3) -{ 1 }-> y :|: b >= 0, z2 = ys, xs >= 0, z3 = x, z'' = y, z = 1, ys >= 0, y >= 0, x >= 0, z' = b, z1 = xs if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(xs, y) :|: z2 = ys, xs >= 0, z3 = x, z'' = y, ys >= 0, y >= 0, x >= 0, z' = 1, z = 0, z1 = xs if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(ys, x) :|: z2 = ys, xs >= 0, z3 = x, z'' = y, ys >= 0, y >= 0, x >= 0, z = 0, z' = 0, z1 = xs inc(z) -{ 1 }-> 1 + inc(x) :|: x >= 0, z = 1 + x inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: x >= 0, z = 1 + x p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + x) :|: x >= 0, z = 1 + (1 + x) sum(z) -{ 1 }-> sumList(xs, 0) :|: xs >= 0, z = xs sumList(z, z') -{ 5 }-> if(1, isZero(0), 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0 sumList(z, z') -{ 5 }-> if(1, isZero(0), 1 + x4, 0, 1 + p(0) + 0, 1 + inc(x4)) :|: x4 >= 0, z' = 1 + x4, z = 0 sumList(z, z') -{ 7 }-> if(0, isZero(x'), 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0 sumList(z, z') -{ 6 }-> if(0, isZero(x'), 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0 sumList(z, z') -{ 7 }-> if(0, isZero(x'), 1 + x'', xs', 1 + p(x') + xs', 1 + inc(x'')) :|: z' = 1 + x'', x' >= 0, xs' >= 0, z = 1 + x' + xs', x'' >= 0 sumList(z, z') -{ 6 }-> if(0, isZero(x'), 1 + x1, xs', 1 + p(0) + xs', 1 + inc(x1)) :|: x1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 1 + x1 sumList(z, z') -{ 6 }-> if(0, isZero(0), 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0 sumList(z, z') -{ 5 }-> if(0, isZero(0), 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0 sumList(z, z') -{ 6 }-> if(0, isZero(0), 1 + x2, xs', 1 + p(x') + xs', 1 + inc(x2)) :|: z' = 1 + x2, x' >= 0, xs' >= 0, z = 1 + x' + xs', x2 >= 0 sumList(z, z') -{ 5 }-> if(0, isZero(0), 1 + x3, xs', 1 + p(0) + xs', 1 + inc(x3)) :|: z' = 1 + x3, x' >= 0, xs' >= 0, z = 1 + x' + xs', x3 >= 0 tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 ---------------------------------------- (15) InliningProof (UPPER BOUND(ID)) Inlined the following terminating rules on right-hand sides where appropriate: isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: x >= 0, z = 1 + x ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 if(z, z', z'', z1, z2, z3) -{ 1 }-> y :|: b >= 0, z2 = ys, xs >= 0, z3 = x, z'' = y, z = 1, ys >= 0, y >= 0, x >= 0, z' = b, z1 = xs if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(xs, y) :|: z2 = ys, xs >= 0, z3 = x, z'' = y, ys >= 0, y >= 0, x >= 0, z' = 1, z = 0, z1 = xs if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(ys, x) :|: z2 = ys, xs >= 0, z3 = x, z'' = y, ys >= 0, y >= 0, x >= 0, z = 0, z' = 0, z1 = xs inc(z) -{ 1 }-> 1 + inc(x) :|: x >= 0, z = 1 + x inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: x >= 0, z = 1 + x p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + x) :|: x >= 0, z = 1 + (1 + x) sum(z) -{ 1 }-> sumList(xs, 0) :|: xs >= 0, z = xs sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + x4, 0, 1 + p(0) + 0, 1 + inc(x4)) :|: x4 >= 0, z' = 1 + x4, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + x'', xs', 1 + p(x') + xs', 1 + inc(x'')) :|: z' = 1 + x'', x' >= 0, xs' >= 0, z = 1 + x' + xs', x'' >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + x1, xs', 1 + p(0) + xs', 1 + inc(x1)) :|: x1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 1 + x1, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + x2, xs', 1 + p(x') + xs', 1 + inc(x2)) :|: z' = 1 + x2, x' >= 0, xs' >= 0, z = 1 + x' + xs', x2 >= 0, 0 = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + x3, xs', 1 + p(0) + xs', 1 + inc(x3)) :|: z' = 1 + x3, x' >= 0, xs' >= 0, z = 1 + x' + xs', x3 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + x'', xs', 1 + p(x') + xs', 1 + inc(x'')) :|: z' = 1 + x'', x' >= 0, xs' >= 0, z = 1 + x' + xs', x'' >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + x1, xs', 1 + p(0) + xs', 1 + inc(x1)) :|: x1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 1 + x1, x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 ---------------------------------------- (17) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 ---------------------------------------- (19) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { isEmpty } { isZero } { inc } { tail } { head } { p } { if, sumList } { sum } ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {isEmpty}, {isZero}, {inc}, {tail}, {head}, {p}, {if,sumList}, {sum} ---------------------------------------- (21) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {isEmpty}, {isZero}, {inc}, {tail}, {head}, {p}, {if,sumList}, {sum} ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: isEmpty after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {isEmpty}, {isZero}, {inc}, {tail}, {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: ?, size: O(1) [1] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: isEmpty after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {isZero}, {inc}, {tail}, {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (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: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {isZero}, {inc}, {tail}, {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: isZero after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {isZero}, {inc}, {tail}, {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: ?, size: O(1) [1] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: isZero 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: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {inc}, {tail}, {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (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: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {inc}, {tail}, {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: inc after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {inc}, {tail}, {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: ?, size: O(n^1) [1 + z] ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: inc after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 }-> 1 + inc(z - 1) :|: z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + inc(z' - 1)) :|: z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + inc(z' - 1)) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + inc(z' - 1)) :|: z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {tail}, {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] ---------------------------------------- (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: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + s5) :|: s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s') :|: s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s3) :|: s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s1) :|: s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s4) :|: s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s'') :|: s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s2) :|: s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {tail}, {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] ---------------------------------------- (41) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: tail after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + s5) :|: s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s') :|: s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s3) :|: s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s1) :|: s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s4) :|: s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s'') :|: s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s2) :|: s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {tail}, {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] tail: runtime: ?, size: O(n^1) [z] ---------------------------------------- (43) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: tail after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (44) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + s5) :|: s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s') :|: s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s3) :|: s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s1) :|: s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s4) :|: s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s'') :|: s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s2) :|: s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] tail: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (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: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + s5) :|: s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s') :|: s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s3) :|: s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s1) :|: s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s4) :|: s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s'') :|: s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s2) :|: s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] tail: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (47) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: head after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (48) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + s5) :|: s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s') :|: s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s3) :|: s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s1) :|: s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s4) :|: s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s'') :|: s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s2) :|: s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {head}, {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] tail: runtime: O(1) [1], size: O(n^1) [z] head: runtime: ?, size: O(n^1) [z] ---------------------------------------- (49) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: head after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (50) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + s5) :|: s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s') :|: s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s3) :|: s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s1) :|: s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s4) :|: s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s'') :|: s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s2) :|: s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] tail: runtime: O(1) [1], size: O(n^1) [z] head: runtime: O(1) [1], size: O(n^1) [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: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + s5) :|: s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s') :|: s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s3) :|: s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s1) :|: s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s4) :|: s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s'') :|: s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s2) :|: s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] tail: runtime: O(1) [1], size: O(n^1) [z] head: runtime: O(1) [1], size: O(n^1) [z] ---------------------------------------- (53) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: p after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (54) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + s5) :|: s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s') :|: s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s3) :|: s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s1) :|: s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s4) :|: s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s'') :|: s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s2) :|: s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {p}, {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] tail: runtime: O(1) [1], size: O(n^1) [z] head: runtime: O(1) [1], size: O(n^1) [z] p: runtime: ?, size: O(n^1) [z] ---------------------------------------- (55) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: p after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 2 + z ---------------------------------------- (56) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> 1 + p(1 + (z - 2)) :|: z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 6 }-> if(1, 1, 0, 0, 1 + p(0) + 0, 1 + 0) :|: z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 6 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + p(0) + 0, 1 + s5) :|: s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 7 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 6 }-> if(0, 1, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s') :|: s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s3) :|: s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 7 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s1) :|: s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 6 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s4) :|: s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 0, 0, xs', 1 + p(x') + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 }-> if(0, 0, 0, xs', 1 + p(0) + xs', 1 + 0) :|: x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 8 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(x') + xs', 1 + s'') :|: s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x sumList(z, z') -{ 7 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + p(0) + xs', 1 + s2) :|: s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] tail: runtime: O(1) [1], size: O(n^1) [z] head: runtime: O(1) [1], size: O(n^1) [z] p: runtime: O(n^1) [2 + z], size: O(n^1) [z] ---------------------------------------- (57) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (58) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 2 + z }-> 1 + s6 :|: s6 >= 0, s6 <= 1 + (z - 2), z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 8 }-> if(1, 1, 0, 0, 1 + s20 + 0, 1 + 0) :|: s20 >= 0, s20 <= 0, z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + s19 + 0, 1 + s5) :|: s19 >= 0, s19 <= 0, s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 9 }-> if(0, 1, 0, xs', 1 + s13 + xs', 1 + 0) :|: s13 >= 0, s13 <= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 9 + x' }-> if(0, 1, 0, xs', 1 + s16 + xs', 1 + 0) :|: s16 >= 0, s16 <= x', x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + s18 + xs', 1 + 0) :|: s18 >= 0, s18 <= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 10 + x' }-> if(0, 1, 0, xs', 1 + s9 + xs', 1 + 0) :|: s9 >= 0, s9 <= x', x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 9 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s11 + xs', 1 + s1) :|: s11 >= 0, s11 <= 0, s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 9 + x' + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s15 + xs', 1 + s3) :|: s15 >= 0, s15 <= x', s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s17 + xs', 1 + s4) :|: s17 >= 0, s17 <= 0, s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 10 + x' + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s7 + xs', 1 + s') :|: s7 >= 0, s7 <= x', s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 10 + x' }-> if(0, 0, 0, xs', 1 + s10 + xs', 1 + 0) :|: s10 >= 0, s10 <= x', x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 9 }-> if(0, 0, 0, xs', 1 + s14 + xs', 1 + 0) :|: s14 >= 0, s14 <= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 9 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + s12 + xs', 1 + s2) :|: s12 >= 0, s12 <= 0, s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x sumList(z, z') -{ 10 + x' + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + s8 + xs', 1 + s'') :|: s8 >= 0, s8 <= x', s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] tail: runtime: O(1) [1], size: O(n^1) [z] head: runtime: O(1) [1], size: O(n^1) [z] p: runtime: O(n^1) [2 + z], size: O(n^1) [z] ---------------------------------------- (59) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: if after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? Computed SIZE bound using CoFloCo for: sumList after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (60) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 2 + z }-> 1 + s6 :|: s6 >= 0, s6 <= 1 + (z - 2), z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 8 }-> if(1, 1, 0, 0, 1 + s20 + 0, 1 + 0) :|: s20 >= 0, s20 <= 0, z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + s19 + 0, 1 + s5) :|: s19 >= 0, s19 <= 0, s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 9 }-> if(0, 1, 0, xs', 1 + s13 + xs', 1 + 0) :|: s13 >= 0, s13 <= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 9 + x' }-> if(0, 1, 0, xs', 1 + s16 + xs', 1 + 0) :|: s16 >= 0, s16 <= x', x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + s18 + xs', 1 + 0) :|: s18 >= 0, s18 <= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 10 + x' }-> if(0, 1, 0, xs', 1 + s9 + xs', 1 + 0) :|: s9 >= 0, s9 <= x', x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 9 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s11 + xs', 1 + s1) :|: s11 >= 0, s11 <= 0, s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 9 + x' + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s15 + xs', 1 + s3) :|: s15 >= 0, s15 <= x', s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s17 + xs', 1 + s4) :|: s17 >= 0, s17 <= 0, s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 10 + x' + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s7 + xs', 1 + s') :|: s7 >= 0, s7 <= x', s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 10 + x' }-> if(0, 0, 0, xs', 1 + s10 + xs', 1 + 0) :|: s10 >= 0, s10 <= x', x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 9 }-> if(0, 0, 0, xs', 1 + s14 + xs', 1 + 0) :|: s14 >= 0, s14 <= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 9 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + s12 + xs', 1 + s2) :|: s12 >= 0, s12 <= 0, s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x sumList(z, z') -{ 10 + x' + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + s8 + xs', 1 + s'') :|: s8 >= 0, s8 <= x', s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] tail: runtime: O(1) [1], size: O(n^1) [z] head: runtime: O(1) [1], size: O(n^1) [z] p: runtime: O(n^1) [2 + z], size: O(n^1) [z] if: runtime: ?, size: INF sumList: runtime: ?, size: INF ---------------------------------------- (61) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: if after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (62) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: z >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> z'' :|: z' >= 0, z1 >= 0, z = 1, z2 >= 0, z'' >= 0, z3 >= 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z1, z'') :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z' = 1, z = 0 if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(z2, z3) :|: z1 >= 0, z2 >= 0, z'' >= 0, z3 >= 0, z = 0, z' = 0 inc(z) -{ 1 + z }-> 1 + s :|: s >= 0, s <= z - 1 + 1, z - 1 >= 0 inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 0 isEmpty(z) -{ 1 }-> 0 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 1 :|: z = 0 isZero(z) -{ 1 }-> 0 :|: z - 1 >= 0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 2 + z }-> 1 + s6 :|: s6 >= 0, s6 <= 1 + (z - 2), z - 2 >= 0 sum(z) -{ 1 }-> sumList(z, 0) :|: z >= 0 sumList(z, z') -{ 8 }-> if(1, 1, 0, 0, 1 + s20 + 0, 1 + 0) :|: s20 >= 0, s20 <= 0, z = 0, z' = 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(1, 1, 1 + (z' - 1), 0, 1 + s19 + 0, 1 + s5) :|: s19 >= 0, s19 <= 0, s5 >= 0, s5 <= z' - 1 + 1, z' - 1 >= 0, z = 0, 0 = 0 sumList(z, z') -{ 9 }-> if(0, 1, 0, xs', 1 + s13 + xs', 1 + 0) :|: s13 >= 0, s13 <= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 9 + x' }-> if(0, 1, 0, xs', 1 + s16 + xs', 1 + 0) :|: s16 >= 0, s16 <= x', x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 8 }-> if(0, 1, 0, xs', 1 + s18 + xs', 1 + 0) :|: s18 >= 0, s18 <= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, 0 = 0 sumList(z, z') -{ 10 + x' }-> if(0, 1, 0, xs', 1 + s9 + xs', 1 + 0) :|: s9 >= 0, s9 <= x', x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x' = 0 sumList(z, z') -{ 9 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s11 + xs', 1 + s1) :|: s11 >= 0, s11 <= 0, s1 >= 0, s1 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x' = 0 sumList(z, z') -{ 9 + x' + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s15 + xs', 1 + s3) :|: s15 >= 0, s15 <= x', s3 >= 0, s3 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 8 + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s17 + xs', 1 + s4) :|: s17 >= 0, s17 <= 0, s4 >= 0, s4 <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, 0 = 0 sumList(z, z') -{ 10 + x' + z' }-> if(0, 1, 1 + (z' - 1), xs', 1 + s7 + xs', 1 + s') :|: s7 >= 0, s7 <= x', s' >= 0, s' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x' = 0 sumList(z, z') -{ 10 + x' }-> if(0, 0, 0, xs', 1 + s10 + xs', 1 + 0) :|: s10 >= 0, s10 <= x', x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 9 }-> if(0, 0, 0, xs', 1 + s14 + xs', 1 + 0) :|: s14 >= 0, s14 <= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' = 0, x >= 0, x' = 1 + x sumList(z, z') -{ 9 + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + s12 + xs', 1 + s2) :|: s12 >= 0, s12 <= 0, s2 >= 0, s2 <= z' - 1 + 1, z' - 1 >= 0, x' >= 0, xs' >= 0, z = 1 + x' + xs', x >= 0, x' = 1 + x sumList(z, z') -{ 10 + x' + z' }-> if(0, 0, 1 + (z' - 1), xs', 1 + s8 + xs', 1 + s'') :|: s8 >= 0, s8 <= x', s'' >= 0, s'' <= z' - 1 + 1, x' >= 0, xs' >= 0, z = 1 + x' + xs', z' - 1 >= 0, x >= 0, x' = 1 + x tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Function symbols to be analyzed: {if,sumList}, {sum} Previous analysis results are: isEmpty: runtime: O(1) [1], size: O(1) [1] isZero: runtime: O(1) [1], size: O(1) [1] inc: runtime: O(n^1) [1 + z], size: O(n^1) [1 + z] tail: runtime: O(1) [1], size: O(n^1) [z] head: runtime: O(1) [1], size: O(n^1) [z] p: runtime: O(n^1) [2 + z], size: O(n^1) [z] if: runtime: INF, size: INF sumList: runtime: ?, size: INF ---------------------------------------- (63) 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: head(v0) -> null_head [0] isZero(v0) -> null_isZero [0] p(v0) -> null_p [0] inc(v0) -> null_inc [0] if(v0, v1, v2, v3, v4, v5) -> null_if [0] And the following fresh constants: null_head, null_isZero, null_p, null_inc, null_if ---------------------------------------- (64) 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: isEmpty(cons(x, xs)) -> false [1] isEmpty(nil) -> true [1] isZero(0) -> true [1] isZero(s(x)) -> false [1] head(cons(x, xs)) -> x [1] tail(cons(x, xs)) -> xs [1] tail(nil) -> nil [1] p(s(s(x))) -> s(p(s(x))) [1] p(s(0)) -> 0 [1] p(0) -> 0 [1] inc(s(x)) -> s(inc(x)) [1] inc(0) -> s(0) [1] sumList(xs, y) -> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), cons(p(head(xs)), tail(xs)), inc(y)) [1] if(true, b, y, xs, ys, x) -> y [1] if(false, true, y, xs, ys, x) -> sumList(xs, y) [1] if(false, false, y, xs, ys, x) -> sumList(ys, x) [1] sum(xs) -> sumList(xs, 0) [1] head(v0) -> null_head [0] isZero(v0) -> null_isZero [0] p(v0) -> null_p [0] inc(v0) -> null_inc [0] if(v0, v1, v2, v3, v4, v5) -> null_if [0] The TRS has the following type information: isEmpty :: cons:nil -> false:true:null_isZero cons :: 0:s:null_head:null_p:null_inc:null_if -> cons:nil -> cons:nil false :: false:true:null_isZero nil :: cons:nil true :: false:true:null_isZero isZero :: 0:s:null_head:null_p:null_inc:null_if -> false:true:null_isZero 0 :: 0:s:null_head:null_p:null_inc:null_if s :: 0:s:null_head:null_p:null_inc:null_if -> 0:s:null_head:null_p:null_inc:null_if head :: cons:nil -> 0:s:null_head:null_p:null_inc:null_if tail :: cons:nil -> cons:nil p :: 0:s:null_head:null_p:null_inc:null_if -> 0:s:null_head:null_p:null_inc:null_if inc :: 0:s:null_head:null_p:null_inc:null_if -> 0:s:null_head:null_p:null_inc:null_if sumList :: cons:nil -> 0:s:null_head:null_p:null_inc:null_if -> 0:s:null_head:null_p:null_inc:null_if if :: false:true:null_isZero -> false:true:null_isZero -> 0:s:null_head:null_p:null_inc:null_if -> cons:nil -> cons:nil -> 0:s:null_head:null_p:null_inc:null_if -> 0:s:null_head:null_p:null_inc:null_if sum :: cons:nil -> 0:s:null_head:null_p:null_inc:null_if null_head :: 0:s:null_head:null_p:null_inc:null_if null_isZero :: false:true:null_isZero null_p :: 0:s:null_head:null_p:null_inc:null_if null_inc :: 0:s:null_head:null_p:null_inc:null_if null_if :: 0:s:null_head:null_p:null_inc:null_if Rewrite Strategy: INNERMOST ---------------------------------------- (65) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: false => 1 nil => 0 true => 2 0 => 0 null_head => 0 null_isZero => 0 null_p => 0 null_inc => 0 null_if => 0 ---------------------------------------- (66) Obligation: Complexity RNTS consisting of the following rules: head(z) -{ 1 }-> x :|: z = 1 + x + xs, xs >= 0, x >= 0 head(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 if(z, z', z'', z1, z2, z3) -{ 1 }-> y :|: z = 2, b >= 0, z2 = ys, xs >= 0, z3 = x, z'' = y, ys >= 0, y >= 0, x >= 0, z' = b, z1 = xs if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(xs, y) :|: z2 = ys, xs >= 0, z3 = x, z' = 2, z'' = y, z = 1, ys >= 0, y >= 0, x >= 0, z1 = xs if(z, z', z'', z1, z2, z3) -{ 1 }-> sumList(ys, x) :|: z2 = ys, xs >= 0, z3 = x, z'' = y, z = 1, ys >= 0, y >= 0, x >= 0, z' = 1, z1 = xs if(z, z', z'', z1, z2, z3) -{ 0 }-> 0 :|: z1 = v3, z3 = v5, v0 >= 0, v4 >= 0, z'' = v2, v1 >= 0, v5 >= 0, z = v0, z' = v1, z2 = v4, v2 >= 0, v3 >= 0 inc(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 inc(z) -{ 1 }-> 1 + inc(x) :|: x >= 0, z = 1 + x inc(z) -{ 1 }-> 1 + 0 :|: z = 0 isEmpty(z) -{ 1 }-> 2 :|: z = 0 isEmpty(z) -{ 1 }-> 1 :|: z = 1 + x + xs, xs >= 0, x >= 0 isZero(z) -{ 1 }-> 2 :|: z = 0 isZero(z) -{ 1 }-> 1 :|: x >= 0, z = 1 + x isZero(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 p(z) -{ 1 }-> 0 :|: z = 1 + 0 p(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 p(z) -{ 1 }-> 1 + p(1 + x) :|: x >= 0, z = 1 + (1 + x) sum(z) -{ 1 }-> sumList(xs, 0) :|: xs >= 0, z = xs sumList(z, z') -{ 1 }-> if(isEmpty(xs), isZero(head(xs)), y, tail(xs), 1 + p(head(xs)) + tail(xs), inc(y)) :|: xs >= 0, z = xs, y >= 0, z' = y tail(z) -{ 1 }-> xs :|: z = 1 + x + xs, xs >= 0, x >= 0 tail(z) -{ 1 }-> 0 :|: z = 0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (67) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (68) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) sumList(z0, z1) -> if(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)) if(true, z0, z1, z2, z3, z4) -> z1 if(false, true, z0, z1, z2, z3) -> sumList(z1, z0) if(false, false, z0, z1, z2, z3) -> sumList(z2, z3) sum(z0) -> sumList(z0, 0) Tuples: ISEMPTY(cons(z0, z1)) -> c ISEMPTY(nil) -> c1 ISZERO(0) -> c2 ISZERO(s(z0)) -> c3 HEAD(cons(z0, z1)) -> c4 TAIL(cons(z0, z1)) -> c5 TAIL(nil) -> c6 P(s(s(z0))) -> c7(P(s(z0))) P(s(0)) -> c8 P(0) -> c9 INC(s(z0)) -> c10(INC(z0)) INC(0) -> c11 SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), ISEMPTY(z0)) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), ISZERO(head(z0)), HEAD(z0)) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), TAIL(z0)) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0)), HEAD(z0)) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), TAIL(z0)) SUMLIST(z0, z1) -> c17(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), INC(z1)) IF(true, z0, z1, z2, z3, z4) -> c18 IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUM(z0) -> c21(SUMLIST(z0, 0)) S tuples: ISEMPTY(cons(z0, z1)) -> c ISEMPTY(nil) -> c1 ISZERO(0) -> c2 ISZERO(s(z0)) -> c3 HEAD(cons(z0, z1)) -> c4 TAIL(cons(z0, z1)) -> c5 TAIL(nil) -> c6 P(s(s(z0))) -> c7(P(s(z0))) P(s(0)) -> c8 P(0) -> c9 INC(s(z0)) -> c10(INC(z0)) INC(0) -> c11 SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), ISEMPTY(z0)) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), ISZERO(head(z0)), HEAD(z0)) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), TAIL(z0)) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0)), HEAD(z0)) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), TAIL(z0)) SUMLIST(z0, z1) -> c17(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), INC(z1)) IF(true, z0, z1, z2, z3, z4) -> c18 IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUM(z0) -> c21(SUMLIST(z0, 0)) K tuples:none Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1, sumList_2, if_6, sum_1 Defined Pair Symbols: ISEMPTY_1, ISZERO_1, HEAD_1, TAIL_1, P_1, INC_1, SUMLIST_2, IF_6, SUM_1 Compound Symbols: c, c1, c2, c3, c4, c5, c6, c7_1, c8, c9, c10_1, c11, c12_2, c13_3, c14_2, c15_3, c16_2, c17_2, c18, c19_1, c20_1, c21_1 ---------------------------------------- (69) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: SUM(z0) -> c21(SUMLIST(z0, 0)) Removed 11 trailing nodes: ISEMPTY(nil) -> c1 INC(0) -> c11 ISZERO(0) -> c2 P(s(0)) -> c8 TAIL(nil) -> c6 HEAD(cons(z0, z1)) -> c4 P(0) -> c9 TAIL(cons(z0, z1)) -> c5 ISEMPTY(cons(z0, z1)) -> c ISZERO(s(z0)) -> c3 IF(true, z0, z1, z2, z3, z4) -> c18 ---------------------------------------- (70) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) sumList(z0, z1) -> if(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)) if(true, z0, z1, z2, z3, z4) -> z1 if(false, true, z0, z1, z2, z3) -> sumList(z1, z0) if(false, false, z0, z1, z2, z3) -> sumList(z2, z3) sum(z0) -> sumList(z0, 0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), ISEMPTY(z0)) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), ISZERO(head(z0)), HEAD(z0)) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), TAIL(z0)) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0)), HEAD(z0)) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), TAIL(z0)) SUMLIST(z0, z1) -> c17(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), INC(z1)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), ISEMPTY(z0)) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), ISZERO(head(z0)), HEAD(z0)) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), TAIL(z0)) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0)), HEAD(z0)) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), TAIL(z0)) SUMLIST(z0, z1) -> c17(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), INC(z1)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) K tuples:none Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1, sumList_2, if_6, sum_1 Defined Pair Symbols: P_1, INC_1, SUMLIST_2, IF_6 Compound Symbols: c7_1, c10_1, c12_2, c13_3, c14_2, c15_3, c16_2, c17_2, c19_1, c20_1 ---------------------------------------- (71) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 6 trailing tuple parts ---------------------------------------- (72) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) sumList(z0, z1) -> if(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)) if(true, z0, z1, z2, z3, z4) -> z1 if(false, true, z0, z1, z2, z3) -> sumList(z1, z0) if(false, false, z0, z1, z2, z3) -> sumList(z2, z3) sum(z0) -> sumList(z0, 0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) SUMLIST(z0, z1) -> c17(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), INC(z1)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) SUMLIST(z0, z1) -> c17(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), INC(z1)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) K tuples:none Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1, sumList_2, if_6, sum_1 Defined Pair Symbols: P_1, INC_1, SUMLIST_2, IF_6 Compound Symbols: c7_1, c10_1, c17_2, c19_1, c20_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (73) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: sumList(z0, z1) -> if(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)) if(true, z0, z1, z2, z3, z4) -> z1 if(false, true, z0, z1, z2, z3) -> sumList(z1, z0) if(false, false, z0, z1, z2, z3) -> sumList(z2, z3) sum(z0) -> sumList(z0, 0) ---------------------------------------- (74) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) SUMLIST(z0, z1) -> c17(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), INC(z1)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) SUMLIST(z0, z1) -> c17(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), INC(z1)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) K tuples:none Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, SUMLIST_2, IF_6 Compound Symbols: c7_1, c10_1, c17_2, c19_1, c20_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (75) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(z0, z1) -> c17(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), INC(z1)) by SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), INC(0)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(nil, x1) -> c17(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(nil, x1) -> c17(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(nil, x1) -> c17(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1)), INC(x1)) ---------------------------------------- (76) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), INC(0)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(nil, x1) -> c17(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(nil, x1) -> c17(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(nil, x1) -> c17(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1)), INC(x1)) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), INC(0)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(nil, x1) -> c17(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(nil, x1) -> c17(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(nil, x1) -> c17(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1)), INC(x1)) K tuples:none Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (77) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 4 trailing tuple parts ---------------------------------------- (78) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) K tuples:none Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2, c17_1 ---------------------------------------- (79) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. SUMLIST(nil, x1) -> c17(INC(x1)) We considered the (Usable) Rules: isEmpty(nil) -> true isEmpty(cons(z0, z1)) -> false And the Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(IF(x_1, x_2, x_3, x_4, x_5, x_6)) = [1] + x_1 POL(INC(x_1)) = 0 POL(P(x_1)) = 0 POL(SUMLIST(x_1, x_2)) = [1] POL(c10(x_1)) = x_1 POL(c12(x_1)) = x_1 POL(c13(x_1)) = x_1 POL(c14(x_1)) = x_1 POL(c15(x_1, x_2)) = x_1 + x_2 POL(c16(x_1)) = x_1 POL(c17(x_1)) = x_1 POL(c17(x_1, x_2)) = x_1 + x_2 POL(c19(x_1)) = x_1 POL(c20(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(cons(x_1, x_2)) = 0 POL(false) = 0 POL(head(x_1)) = [1] POL(inc(x_1)) = [1] POL(isEmpty(x_1)) = 0 POL(isZero(x_1)) = [1] POL(nil) = [1] POL(p(x_1)) = [1] POL(s(x_1)) = 0 POL(tail(x_1)) = [1] POL(true) = 0 ---------------------------------------- (80) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2, c17_1 ---------------------------------------- (81) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(z0, z1) -> c12(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) by SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c12(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c12(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c12(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) ---------------------------------------- (82) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c12(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c12(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c12(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c12(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c12(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c12(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c13_1, c14_1, c15_2, c16_1, c17_2, c17_1, c12_1 ---------------------------------------- (83) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, x1) -> c12(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(nil, x1) -> c12(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(nil, x1) -> c12(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) ---------------------------------------- (84) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c13_1, c14_1, c15_2, c16_1, c17_2, c17_1, c12_1 ---------------------------------------- (85) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(z0, z1) -> c13(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) by SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c13(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c13(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c13(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) ---------------------------------------- (86) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c13(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c13(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c13(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c13(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c13(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c13(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c14_1, c15_2, c16_1, c17_2, c17_1, c12_1, c13_1 ---------------------------------------- (87) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, x1) -> c13(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(nil, x1) -> c13(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(nil, x1) -> c13(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) ---------------------------------------- (88) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c14_1, c15_2, c16_1, c17_2, c17_1, c12_1, c13_1 ---------------------------------------- (89) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(z0, z1) -> c14(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) by SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c14(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c14(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c14(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) ---------------------------------------- (90) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c14(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c14(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c14(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c14(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c14(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c14(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c15_2, c16_1, c17_2, c17_1, c12_1, c13_1, c14_1 ---------------------------------------- (91) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, x1) -> c14(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(nil, x1) -> c14(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(nil, x1) -> c14(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) ---------------------------------------- (92) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c15_2, c16_1, c17_2, c17_1, c12_1, c13_1, c14_1 ---------------------------------------- (93) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(z0, z1) -> c15(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1)), P(head(z0))) by SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(nil, x1) -> c15(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1)), P(head(nil))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(nil, x1) -> c15(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1)), P(head(nil))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(nil, x1) -> c15(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1)), P(head(nil))) ---------------------------------------- (94) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(nil, x1) -> c15(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1)), P(head(nil))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(nil, x1) -> c15(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1)), P(head(nil))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(nil, x1) -> c15(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1)), P(head(nil))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(nil, x1) -> c15(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1)), P(head(nil))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(nil, x1) -> c15(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1)), P(head(nil))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(nil, x1) -> c15(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1)), P(head(nil))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c16_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2 ---------------------------------------- (95) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, x1) -> c15(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1)), P(head(nil))) SUMLIST(nil, x1) -> c15(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1)), P(head(nil))) SUMLIST(nil, x1) -> c15(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1)), P(head(nil))) ---------------------------------------- (96) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c16_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2 ---------------------------------------- (97) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(z0, z1) -> c16(IF(isEmpty(z0), isZero(head(z0)), z1, tail(z0), cons(p(head(z0)), tail(z0)), inc(z1))) by SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c16(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c16(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c16(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) ---------------------------------------- (98) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c16(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c16(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c16(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(nil, x1) -> c16(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c16(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(nil, x1) -> c16(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (99) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, x1) -> c16(IF(isEmpty(nil), isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), nil), inc(x1))) SUMLIST(nil, x1) -> c16(IF(true, isZero(head(nil)), x1, tail(nil), cons(p(head(nil)), tail(nil)), inc(x1))) SUMLIST(nil, x1) -> c16(IF(isEmpty(nil), isZero(head(nil)), x1, nil, cons(p(head(nil)), tail(nil)), inc(x1))) ---------------------------------------- (100) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (101) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, s(z0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), INC(s(z0))) by SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) ---------------------------------------- (102) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (103) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing tuple parts ---------------------------------------- (104) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (105) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) We considered the (Usable) Rules: isEmpty(nil) -> true isEmpty(cons(z0, z1)) -> false And the Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = 0 POL(IF(x_1, x_2, x_3, x_4, x_5, x_6)) = x_1 POL(INC(x_1)) = 0 POL(P(x_1)) = 0 POL(SUMLIST(x_1, x_2)) = [1] POL(c10(x_1)) = x_1 POL(c12(x_1)) = x_1 POL(c13(x_1)) = x_1 POL(c14(x_1)) = x_1 POL(c15(x_1, x_2)) = x_1 + x_2 POL(c16(x_1)) = x_1 POL(c17(x_1)) = x_1 POL(c17(x_1, x_2)) = x_1 + x_2 POL(c19(x_1)) = x_1 POL(c20(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(cons(x_1, x_2)) = 0 POL(false) = [1] POL(head(x_1)) = [1] POL(inc(x_1)) = [1] + x_1 POL(isEmpty(x_1)) = [1] POL(isZero(x_1)) = [1] POL(nil) = [1] POL(p(x_1)) = [1] POL(s(x_1)) = 0 POL(tail(x_1)) = [1] POL(true) = [1] ---------------------------------------- (106) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (107) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), INC(x1)) by SUMLIST(cons(x0, x1), s(z0)) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(inc(z0))), INC(s(z0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0)), INC(0)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) ---------------------------------------- (108) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0)), INC(0)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0)), INC(0)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (109) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (110) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (111) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), INC(x1)) by SUMLIST(cons(x0, x1), s(z0)) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(inc(z0))), INC(s(z0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0)), INC(0)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) ---------------------------------------- (112) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0)), INC(0)) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0)), INC(0)) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (113) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (114) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (115) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) by SUMLIST(cons(x0, x1), s(z0)) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0))), INC(s(z0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), INC(0)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) ---------------------------------------- (116) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), INC(0)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), INC(0)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (117) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (118) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (119) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) by SUMLIST(cons(x0, x1), s(z0)) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0))), INC(s(z0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), INC(0)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) ---------------------------------------- (120) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), INC(0)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), INC(0)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (121) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (122) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_2, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1 ---------------------------------------- (123) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c17(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), INC(x1)) by SUMLIST(cons(x0, x1), s(z0)) -> c17(IF(false, isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0))), INC(s(z0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), INC(0)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) ---------------------------------------- (124) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), INC(0)) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), INC(0)) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (125) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (126) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (127) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, 0) -> c17(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) by SUMLIST(cons(z0, z1), 0) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c17(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c17(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c17(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c17(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) ---------------------------------------- (128) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(nil, 0) -> c17(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(nil, 0) -> c17(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(nil, 0) -> c17(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(nil, 0) -> c17(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(nil, 0) -> c17(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(nil, 0) -> c17(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (129) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, 0) -> c17(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(nil, 0) -> c17(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(nil, 0) -> c17(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) ---------------------------------------- (130) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (131) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, s(z0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) by SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c12(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c12(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c12(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) ---------------------------------------- (132) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c12(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c12(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c12(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c12(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c12(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c12(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (133) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, s(x1)) -> c12(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c12(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c12(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) ---------------------------------------- (134) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (135) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, 0) -> c12(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) by SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c12(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c12(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c12(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) ---------------------------------------- (136) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c12(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c12(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c12(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c12(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c12(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c12(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (137) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, 0) -> c12(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(nil, 0) -> c12(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(nil, 0) -> c12(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) ---------------------------------------- (138) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (139) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c12(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c12(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) ---------------------------------------- (140) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (141) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c12(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c12(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (142) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (143) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c12(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c12(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (144) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (145) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c12(IF(isEmpty(cons(x0, x1)), isZero(x0), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c12(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (146) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c12_1, c13_1, c14_1, c15_2, c16_1, c17_2 ---------------------------------------- (147) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c12(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c12(IF(false, isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c12(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (148) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c13_1, c14_1, c15_2, c16_1, c17_2, c12_1 ---------------------------------------- (149) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, s(z0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) by SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c13(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c13(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c13(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) ---------------------------------------- (150) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c13(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c13(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c13(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c13(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c13(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c13(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c13_1, c14_1, c15_2, c16_1, c17_2, c12_1 ---------------------------------------- (151) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, s(x1)) -> c13(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c13(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c13(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) ---------------------------------------- (152) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c13_1, c14_1, c15_2, c16_1, c17_2, c12_1 ---------------------------------------- (153) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, 0) -> c13(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) by SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c13(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c13(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c13(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) ---------------------------------------- (154) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c13(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c13(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c13(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c13(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c13(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c13(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c13_1, c14_1, c15_2, c16_1, c17_2, c12_1 ---------------------------------------- (155) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, 0) -> c13(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(nil, 0) -> c13(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(nil, 0) -> c13(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) ---------------------------------------- (156) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c13_1, c14_1, c15_2, c16_1, c17_2, c12_1 ---------------------------------------- (157) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c13(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c13(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) ---------------------------------------- (158) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c13_1, c14_1, c15_2, c16_1, c17_2, c12_1 ---------------------------------------- (159) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c13(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c13(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (160) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c13_1, c14_1, c15_2, c16_1, c17_2, c12_1 ---------------------------------------- (161) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c13(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c13(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (162) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c13_1, c14_1, c15_2, c16_1, c17_2, c12_1 ---------------------------------------- (163) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c13(IF(isEmpty(cons(x0, x1)), isZero(x0), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c13(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (164) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c13_1, c14_1, c15_2, c16_1, c17_2, c12_1 ---------------------------------------- (165) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c13(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c13(IF(false, isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c13(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (166) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c14_1, c15_2, c16_1, c17_2, c12_1, c13_1 ---------------------------------------- (167) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, s(z0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) by SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c14(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c14(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c14(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) ---------------------------------------- (168) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c14(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c14(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c14(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c14(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c14(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c14(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c14_1, c15_2, c16_1, c17_2, c12_1, c13_1 ---------------------------------------- (169) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, s(x1)) -> c14(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c14(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c14(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) ---------------------------------------- (170) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c14_1, c15_2, c16_1, c17_2, c12_1, c13_1 ---------------------------------------- (171) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, 0) -> c14(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) by SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c14(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c14(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c14(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) ---------------------------------------- (172) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c14(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c14(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c14(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c14(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c14(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c14(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c14_1, c15_2, c16_1, c17_2, c12_1, c13_1 ---------------------------------------- (173) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, 0) -> c14(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(nil, 0) -> c14(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(nil, 0) -> c14(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) ---------------------------------------- (174) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c14_1, c15_2, c16_1, c17_2, c12_1, c13_1 ---------------------------------------- (175) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c14(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c14(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) ---------------------------------------- (176) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c14_1, c15_2, c16_1, c17_2, c12_1, c13_1 ---------------------------------------- (177) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c14(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c14(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (178) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c14_1, c15_2, c16_1, c17_2, c12_1, c13_1 ---------------------------------------- (179) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c14(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c14(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (180) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c14_1, c15_2, c16_1, c17_2, c12_1, c13_1 ---------------------------------------- (181) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c14(IF(isEmpty(cons(x0, x1)), isZero(x0), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c14(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (182) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c14_1, c15_2, c16_1, c17_2, c12_1, c13_1 ---------------------------------------- (183) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c14(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c14(IF(false, isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c14(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (184) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c15_2, c16_1, c17_2, c12_1, c13_1, c14_1 ---------------------------------------- (185) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, s(z0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0))), P(head(x0))) by SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(nil, s(x1)) -> c15(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1))), P(head(nil))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(nil, s(x1)) -> c15(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1))), P(head(nil))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(nil, s(x1)) -> c15(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1))), P(head(nil))) ---------------------------------------- (186) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(nil, s(x1)) -> c15(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1))), P(head(nil))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(nil, s(x1)) -> c15(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1))), P(head(nil))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(nil, s(x1)) -> c15(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1))), P(head(nil))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(nil, s(x1)) -> c15(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1))), P(head(nil))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(nil, s(x1)) -> c15(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1))), P(head(nil))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(nil, s(x1)) -> c15(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1))), P(head(nil))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c15_2, c16_1, c17_2, c12_1, c13_1, c14_1 ---------------------------------------- (187) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, s(x1)) -> c15(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1))), P(head(nil))) SUMLIST(nil, s(x1)) -> c15(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1))), P(head(nil))) SUMLIST(nil, s(x1)) -> c15(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1))), P(head(nil))) ---------------------------------------- (188) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c15_2, c16_1, c17_2, c12_1, c13_1, c14_1 ---------------------------------------- (189) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, 0) -> c15(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0)), P(head(x0))) by SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(nil, 0) -> c15(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0)), P(head(nil))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(nil, 0) -> c15(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0)), P(head(nil))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(nil, 0) -> c15(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0)), P(head(nil))) ---------------------------------------- (190) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(nil, 0) -> c15(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0)), P(head(nil))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(nil, 0) -> c15(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0)), P(head(nil))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(nil, 0) -> c15(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0)), P(head(nil))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(nil, 0) -> c15(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0)), P(head(nil))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(nil, 0) -> c15(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0)), P(head(nil))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(nil, 0) -> c15(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0)), P(head(nil))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c15_2, c16_1, c17_2, c12_1, c13_1, c14_1 ---------------------------------------- (191) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, 0) -> c15(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0)), P(head(nil))) SUMLIST(nil, 0) -> c15(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0)), P(head(nil))) SUMLIST(nil, 0) -> c15(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0)), P(head(nil))) ---------------------------------------- (192) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c15_2, c16_1, c17_2, c12_1, c13_1, c14_1 ---------------------------------------- (193) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1)), P(head(cons(z0, z1)))) by SUMLIST(cons(x0, x1), s(z0)) -> c15(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(inc(z0))), P(head(cons(x0, x1)))) SUMLIST(cons(x0, x1), 0) -> c15(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0)), P(head(cons(x0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) ---------------------------------------- (194) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c15_2, c16_1, c17_2, c12_1, c13_1, c14_1 ---------------------------------------- (195) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) by SUMLIST(cons(x0, x1), s(z0)) -> c15(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(inc(z0))), P(head(cons(x0, x1)))) SUMLIST(cons(x0, x1), 0) -> c15(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0)), P(head(cons(x0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) ---------------------------------------- (196) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c15_2, c16_1, c17_2, c12_1, c13_1, c14_1 ---------------------------------------- (197) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) by SUMLIST(cons(x0, x1), s(z0)) -> c15(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0))), P(head(cons(x0, x1)))) SUMLIST(cons(x0, x1), 0) -> c15(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), P(head(cons(x0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) ---------------------------------------- (198) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c15_2, c16_1, c17_2, c12_1, c13_1, c14_1 ---------------------------------------- (199) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) by SUMLIST(cons(x0, x1), s(z0)) -> c15(IF(isEmpty(cons(x0, x1)), isZero(x0), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0))), P(head(cons(x0, x1)))) SUMLIST(cons(x0, x1), 0) -> c15(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), P(head(cons(x0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) ---------------------------------------- (200) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c15_2, c16_1, c17_2, c12_1, c13_1, c14_1 ---------------------------------------- (201) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c15(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1)), P(head(cons(z0, z1)))) by SUMLIST(cons(x0, x1), s(z0)) -> c15(IF(false, isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0))), P(head(cons(x0, x1)))) SUMLIST(cons(x0, x1), 0) -> c15(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0)), P(head(cons(x0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) ---------------------------------------- (202) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c16_1, c17_2, c12_1, c13_1, c14_1, c15_2 ---------------------------------------- (203) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, s(z0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(z0), tail(x0), cons(p(head(x0)), tail(x0)), s(inc(z0)))) by SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c16(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c16(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c16(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) ---------------------------------------- (204) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c16(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c16(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c16(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c16(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c16(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c16(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c16_1, c17_2, c12_1, c13_1, c14_1, c15_2 ---------------------------------------- (205) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, s(x1)) -> c16(IF(true, isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), tail(nil)), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c16(IF(isEmpty(nil), isZero(head(nil)), s(x1), tail(nil), cons(p(head(nil)), nil), s(inc(x1)))) SUMLIST(nil, s(x1)) -> c16(IF(isEmpty(nil), isZero(head(nil)), s(x1), nil, cons(p(head(nil)), tail(nil)), s(inc(x1)))) ---------------------------------------- (206) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c16_1, c17_2, c12_1, c13_1, c14_1, c15_2 ---------------------------------------- (207) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(x0, 0) -> c16(IF(isEmpty(x0), isZero(head(x0)), 0, tail(x0), cons(p(head(x0)), tail(x0)), s(0))) by SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c16(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c16(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c16(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) ---------------------------------------- (208) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c16(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c16(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c16(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(nil, 0) -> c16(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c16(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(nil, 0) -> c16(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c16_1, c17_2, c12_1, c13_1, c14_1, c15_2 ---------------------------------------- (209) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 3 trailing nodes: SUMLIST(nil, 0) -> c16(IF(isEmpty(nil), isZero(head(nil)), 0, nil, cons(p(head(nil)), tail(nil)), s(0))) SUMLIST(nil, 0) -> c16(IF(isEmpty(nil), isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), nil), s(0))) SUMLIST(nil, 0) -> c16(IF(true, isZero(head(nil)), 0, tail(nil), cons(p(head(nil)), tail(nil)), s(0))) ---------------------------------------- (210) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c16_1, c17_2, c12_1, c13_1, c14_1, c15_2 ---------------------------------------- (211) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c16(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c16(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) ---------------------------------------- (212) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c16_1, c17_2, c12_1, c13_1, c14_1, c15_2 ---------------------------------------- (213) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c16(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c16(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c16(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c16(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c16(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (214) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c16(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c16(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c16(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c16(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c16(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c16(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c16_1, c17_2, c12_1, c13_1, c14_1, c15_2 ---------------------------------------- (215) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x1, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c16(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), s(z0), x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c16(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (216) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c16(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c16(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c16(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c16(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c16(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c16(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c16_1, c17_2, c12_1, c13_1, c14_1, c15_2 ---------------------------------------- (217) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace SUMLIST(cons(z0, z1), x1) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) by SUMLIST(cons(x0, x1), s(z0)) -> c16(IF(isEmpty(cons(x0, x1)), isZero(x0), s(z0), tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(inc(z0)))) SUMLIST(cons(x0, x1), 0) -> c16(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c16(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c16(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) ---------------------------------------- (218) Obligation: Complexity Dependency Tuples Problem Rules: isEmpty(cons(z0, z1)) -> false isEmpty(nil) -> true isZero(0) -> true isZero(s(z0)) -> false head(cons(z0, z1)) -> z0 tail(cons(z0, z1)) -> z1 tail(nil) -> nil p(s(s(z0))) -> s(p(s(z0))) p(s(0)) -> 0 p(0) -> 0 inc(s(z0)) -> s(inc(z0)) inc(0) -> s(0) Tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c16(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c16(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c16(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c16(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c16(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) S tuples: P(s(s(z0))) -> c7(P(s(z0))) INC(s(z0)) -> c10(INC(z0)) IF(false, true, z0, z1, z2, z3) -> c19(SUMLIST(z1, z0)) IF(false, false, z0, z1, z2, z3) -> c20(SUMLIST(z2, z3)) SUMLIST(cons(z0, z1), x1) -> c16(IF(false, isZero(head(cons(z0, z1))), x1, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x1))) SUMLIST(x0, s(s(z0))) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), INC(s(s(z0)))) SUMLIST(x0, s(0)) -> c17(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), INC(s(0))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), s(x1)) -> c17(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), INC(s(x1))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), x1), s(0))) SUMLIST(cons(s(s(z0)), x1), x2) -> c17(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(0), x1), x2) -> c17(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(x0), tail(cons(x0, x1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c17(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(head(cons(x0, x1))), 0, x1, cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(0, x1), x2) -> c17(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), INC(x2)) SUMLIST(cons(s(z0), x1), x2) -> c17(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), INC(x2)) SUMLIST(cons(z0, z1), x2) -> c17(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), INC(x2)) SUMLIST(cons(x0, x1), 0) -> c17(IF(isEmpty(cons(x0, x1)), isZero(x0), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(cons(x0, x1), 0) -> c17(IF(false, isZero(head(cons(x0, x1))), 0, tail(cons(x0, x1)), cons(p(head(cons(x0, x1))), tail(cons(x0, x1))), s(0))) SUMLIST(x0, s(s(z0))) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c12(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c12(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c12(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c12(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c12(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c12(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c12(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c12(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c13(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c13(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c13(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c13(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c13(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c13(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c13(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c13(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c14(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c14(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c14(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c14(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c14(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c14(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c14(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c14(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(x0, s(s(z0))) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0)))), P(head(x0))) SUMLIST(x0, s(0)) -> c15(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0))), P(head(x0))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), s(x1)) -> c15(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1))), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), 0) -> c15(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(s(s(z0)), x1), x2) -> c15(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2)), P(head(cons(s(s(z0)), x1)))) SUMLIST(cons(s(0), x1), x2) -> c15(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2)), P(head(cons(s(0), x1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(cons(0, x1), x2) -> c15(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2)), P(head(cons(0, x1)))) SUMLIST(cons(s(z0), x1), x2) -> c15(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2)), P(head(cons(s(z0), x1)))) SUMLIST(cons(z0, z1), x2) -> c15(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2)), P(head(cons(z0, z1)))) SUMLIST(x0, s(s(z0))) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(s(z0)), tail(x0), cons(p(head(x0)), tail(x0)), s(s(inc(z0))))) SUMLIST(x0, s(0)) -> c16(IF(isEmpty(x0), isZero(head(x0)), s(0), tail(x0), cons(p(head(x0)), tail(x0)), s(s(0)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), s(x1), z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), s(x1)) -> c16(IF(false, isZero(head(cons(z0, z1))), s(x1), tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(inc(x1)))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), 0, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), 0) -> c16(IF(false, isZero(head(cons(z0, z1))), 0, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), s(0))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), z1), inc(x2))) SUMLIST(cons(s(s(z0)), x1), x2) -> c16(IF(isEmpty(cons(s(s(z0)), x1)), isZero(head(cons(s(s(z0)), x1))), x2, tail(cons(s(s(z0)), x1)), cons(s(p(s(z0))), tail(cons(s(s(z0)), x1))), inc(x2))) SUMLIST(cons(s(0), x1), x2) -> c16(IF(isEmpty(cons(s(0), x1)), isZero(head(cons(s(0), x1))), x2, tail(cons(s(0), x1)), cons(0, tail(cons(s(0), x1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c16(IF(isEmpty(cons(0, x1)), isZero(head(cons(0, x1))), x2, tail(cons(0, x1)), cons(0, tail(cons(0, x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(head(cons(z0, z1))), x2, z1, cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, tail(cons(z0, z1)), cons(p(z0), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(isEmpty(cons(z0, z1)), isZero(z0), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(head(cons(z0, z1))), x2, z1, cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) SUMLIST(cons(0, x1), x2) -> c16(IF(isEmpty(cons(0, x1)), true, x2, tail(cons(0, x1)), cons(p(head(cons(0, x1))), tail(cons(0, x1))), inc(x2))) SUMLIST(cons(s(z0), x1), x2) -> c16(IF(isEmpty(cons(s(z0), x1)), false, x2, tail(cons(s(z0), x1)), cons(p(head(cons(s(z0), x1))), tail(cons(s(z0), x1))), inc(x2))) SUMLIST(cons(z0, z1), x2) -> c16(IF(false, isZero(z0), x2, tail(cons(z0, z1)), cons(p(head(cons(z0, z1))), tail(cons(z0, z1))), inc(x2))) K tuples: SUMLIST(nil, x1) -> c17(INC(x1)) SUMLIST(x0, s(x1)) -> c17(INC(s(x1))) SUMLIST(nil, s(x1)) -> c17(INC(s(x1))) Defined Rule Symbols: isEmpty_1, isZero_1, head_1, tail_1, p_1, inc_1 Defined Pair Symbols: P_1, INC_1, IF_6, SUMLIST_2 Compound Symbols: c7_1, c10_1, c19_1, c20_1, c17_1, c16_1, c17_2, c12_1, c13_1, c14_1, c15_2