YES proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty Termination w.r.t. Q of the given QTRS could be proven: (0) QTRS (1) Overlay + Local Confluence [EQUIVALENT, 0 ms] (2) QTRS (3) DependencyPairsProof [EQUIVALENT, 22 ms] (4) QDP (5) DependencyGraphProof [EQUIVALENT, 0 ms] (6) AND (7) QDP (8) UsableRulesProof [EQUIVALENT, 0 ms] (9) QDP (10) QReductionProof [EQUIVALENT, 0 ms] (11) QDP (12) QDPSizeChangeProof [EQUIVALENT, 0 ms] (13) YES (14) QDP (15) UsableRulesProof [EQUIVALENT, 0 ms] (16) QDP (17) QReductionProof [EQUIVALENT, 0 ms] (18) QDP (19) QDPOrderProof [EQUIVALENT, 22 ms] (20) QDP (21) DependencyGraphProof [EQUIVALENT, 0 ms] (22) TRUE (23) QDP (24) UsableRulesProof [EQUIVALENT, 0 ms] (25) QDP (26) QReductionProof [EQUIVALENT, 0 ms] (27) QDP (28) QDPOrderProof [EQUIVALENT, 24 ms] (29) QDP (30) DependencyGraphProof [EQUIVALENT, 0 ms] (31) TRUE (32) QDP (33) UsableRulesProof [EQUIVALENT, 0 ms] (34) QDP (35) QReductionProof [EQUIVALENT, 0 ms] (36) QDP (37) TransformationProof [EQUIVALENT, 0 ms] (38) QDP (39) TransformationProof [EQUIVALENT, 0 ms] (40) QDP (41) DependencyGraphProof [EQUIVALENT, 0 ms] (42) QDP (43) TransformationProof [EQUIVALENT, 0 ms] (44) QDP (45) UsableRulesProof [EQUIVALENT, 0 ms] (46) QDP (47) TransformationProof [EQUIVALENT, 0 ms] (48) QDP (49) TransformationProof [EQUIVALENT, 0 ms] (50) QDP (51) UsableRulesProof [EQUIVALENT, 0 ms] (52) QDP (53) TransformationProof [EQUIVALENT, 0 ms] (54) QDP (55) TransformationProof [EQUIVALENT, 0 ms] (56) QDP (57) UsableRulesProof [EQUIVALENT, 0 ms] (58) QDP (59) QReductionProof [EQUIVALENT, 0 ms] (60) QDP (61) TransformationProof [EQUIVALENT, 0 ms] (62) QDP (63) TransformationProof [EQUIVALENT, 0 ms] (64) QDP (65) DependencyGraphProof [EQUIVALENT, 0 ms] (66) QDP (67) UsableRulesProof [EQUIVALENT, 0 ms] (68) QDP (69) QReductionProof [EQUIVALENT, 0 ms] (70) QDP (71) TransformationProof [EQUIVALENT, 0 ms] (72) QDP (73) DependencyGraphProof [EQUIVALENT, 0 ms] (74) QDP (75) UsableRulesProof [EQUIVALENT, 0 ms] (76) QDP (77) QReductionProof [EQUIVALENT, 0 ms] (78) QDP (79) TransformationProof [EQUIVALENT, 0 ms] (80) QDP (81) UsableRulesProof [EQUIVALENT, 0 ms] (82) QDP (83) QReductionProof [EQUIVALENT, 0 ms] (84) QDP (85) TransformationProof [EQUIVALENT, 0 ms] (86) QDP (87) QDPOrderProof [EQUIVALENT, 10 ms] (88) QDP (89) DependencyGraphProof [EQUIVALENT, 0 ms] (90) TRUE ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0) -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0), shorter(l, s(0)), l) if(true, b, l) -> s(0) if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) Q is empty. ---------------------------------------- (1) Overlay + Local Confluence (EQUIVALENT) The TRS is overlay and locally confluent. By [NOC] we can switch to innermost. ---------------------------------------- (2) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0) -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0), shorter(l, s(0)), l) if(true, b, l) -> s(0) if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) ---------------------------------------- (3) DependencyPairsProof (EQUIVALENT) Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem. ---------------------------------------- (4) Obligation: Q DP problem: The TRS P consists of the following rules: PLUS(x, y) -> IFPLUS(isZero(x), x, y) PLUS(x, y) -> ISZERO(x) IFPLUS(false, x, y) -> PLUS(p(x), y) IFPLUS(false, x, y) -> P(x) TIMES(x, y) -> IFTIMES(isZero(x), x, y) TIMES(x, y) -> ISZERO(x) IFTIMES(false, x, y) -> PLUS(y, times(p(x), y)) IFTIMES(false, x, y) -> TIMES(p(x), y) IFTIMES(false, x, y) -> P(x) SHORTER(cons(x, l), s(y)) -> SHORTER(l, y) PROD(l) -> IF(shorter(l, 0), shorter(l, s(0)), l) PROD(l) -> SHORTER(l, 0) PROD(l) -> SHORTER(l, s(0)) IF(false, b, l) -> IF2(b, l) IF2(true, l) -> CAR(l) IF2(false, l) -> PROD(cons(times(car(l), cadr(l)), cddr(l))) IF2(false, l) -> TIMES(car(l), cadr(l)) IF2(false, l) -> CAR(l) IF2(false, l) -> CADR(l) IF2(false, l) -> CDDR(l) The TRS R consists of the following rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0) -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0), shorter(l, s(0)), l) if(true, b, l) -> s(0) if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 4 SCCs with 12 less nodes. ---------------------------------------- (6) Complex Obligation (AND) ---------------------------------------- (7) Obligation: Q DP problem: The TRS P consists of the following rules: SHORTER(cons(x, l), s(y)) -> SHORTER(l, y) The TRS R consists of the following rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0) -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0), shorter(l, s(0)), l) if(true, b, l) -> s(0) if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (8) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (9) Obligation: Q DP problem: The TRS P consists of the following rules: SHORTER(cons(x, l), s(y)) -> SHORTER(l, y) R is empty. The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (10) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) ---------------------------------------- (11) Obligation: Q DP problem: The TRS P consists of the following rules: SHORTER(cons(x, l), s(y)) -> SHORTER(l, y) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (12) QDPSizeChangeProof (EQUIVALENT) By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs: *SHORTER(cons(x, l), s(y)) -> SHORTER(l, y) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (13) YES ---------------------------------------- (14) Obligation: Q DP problem: The TRS P consists of the following rules: IFPLUS(false, x, y) -> PLUS(p(x), y) PLUS(x, y) -> IFPLUS(isZero(x), x, y) The TRS R consists of the following rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0) -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0), shorter(l, s(0)), l) if(true, b, l) -> s(0) if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (15) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (16) Obligation: Q DP problem: The TRS P consists of the following rules: IFPLUS(false, x, y) -> PLUS(p(x), y) PLUS(x, y) -> IFPLUS(isZero(x), x, y) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false p(s(x)) -> x p(0) -> 0 The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (17) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) ---------------------------------------- (18) Obligation: Q DP problem: The TRS P consists of the following rules: IFPLUS(false, x, y) -> PLUS(p(x), y) PLUS(x, y) -> IFPLUS(isZero(x), x, y) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false p(s(x)) -> x p(0) -> 0 The set Q consists of the following terms: isZero(0) isZero(s(x0)) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (19) QDPOrderProof (EQUIVALENT) We use the reduction pair processor [LPAR04,JAR06]. The following pairs can be oriented strictly and are deleted. IFPLUS(false, x, y) -> PLUS(p(x), y) The remaining pairs can at least be oriented weakly. Used ordering: Polynomial interpretation [POLO,RATPOLO]: POL(0) = 0 POL(IFPLUS(x_1, x_2, x_3)) = [1/4]x_1 + [1/4]x_2 POL(PLUS(x_1, x_2)) = x_1 POL(false) = [1/4] POL(isZero(x_1)) = [1/2]x_1 POL(p(x_1)) = [1/4]x_1 POL(s(x_1)) = [2] + [4]x_1 POL(true) = 0 The value of delta used in the strict ordering is 1/16. The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: p(s(x)) -> x p(0) -> 0 isZero(0) -> true isZero(s(x)) -> false ---------------------------------------- (20) Obligation: Q DP problem: The TRS P consists of the following rules: PLUS(x, y) -> IFPLUS(isZero(x), x, y) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false p(s(x)) -> x p(0) -> 0 The set Q consists of the following terms: isZero(0) isZero(s(x0)) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (21) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node. ---------------------------------------- (22) TRUE ---------------------------------------- (23) Obligation: Q DP problem: The TRS P consists of the following rules: IFTIMES(false, x, y) -> TIMES(p(x), y) TIMES(x, y) -> IFTIMES(isZero(x), x, y) The TRS R consists of the following rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0) -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0), shorter(l, s(0)), l) if(true, b, l) -> s(0) if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (24) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (25) Obligation: Q DP problem: The TRS P consists of the following rules: IFTIMES(false, x, y) -> TIMES(p(x), y) TIMES(x, y) -> IFTIMES(isZero(x), x, y) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false p(s(x)) -> x p(0) -> 0 The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (26) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) ---------------------------------------- (27) Obligation: Q DP problem: The TRS P consists of the following rules: IFTIMES(false, x, y) -> TIMES(p(x), y) TIMES(x, y) -> IFTIMES(isZero(x), x, y) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false p(s(x)) -> x p(0) -> 0 The set Q consists of the following terms: isZero(0) isZero(s(x0)) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (28) QDPOrderProof (EQUIVALENT) We use the reduction pair processor [LPAR04,JAR06]. The following pairs can be oriented strictly and are deleted. IFTIMES(false, x, y) -> TIMES(p(x), y) The remaining pairs can at least be oriented weakly. Used ordering: Polynomial interpretation [POLO,RATPOLO]: POL(0) = 0 POL(IFTIMES(x_1, x_2, x_3)) = [1/4]x_1 + [1/4]x_2 POL(TIMES(x_1, x_2)) = x_1 POL(false) = [1/4] POL(isZero(x_1)) = [1/2]x_1 POL(p(x_1)) = [1/4]x_1 POL(s(x_1)) = [2] + [4]x_1 POL(true) = 0 The value of delta used in the strict ordering is 1/16. The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: p(s(x)) -> x p(0) -> 0 isZero(0) -> true isZero(s(x)) -> false ---------------------------------------- (29) Obligation: Q DP problem: The TRS P consists of the following rules: TIMES(x, y) -> IFTIMES(isZero(x), x, y) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false p(s(x)) -> x p(0) -> 0 The set Q consists of the following terms: isZero(0) isZero(s(x0)) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (30) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node. ---------------------------------------- (31) TRUE ---------------------------------------- (32) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(false, l) -> PROD(cons(times(car(l), cadr(l)), cddr(l))) PROD(l) -> IF(shorter(l, 0), shorter(l, s(0)), l) IF(false, b, l) -> IF2(b, l) The TRS R consists of the following rules: car(cons(x, l)) -> x cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l cadr(cons(x, cons(y, l))) -> y isZero(0) -> true isZero(s(x)) -> false plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) times(x, y) -> iftimes(isZero(x), x, y) iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) prod(l) -> if(shorter(l, 0), shorter(l, s(0)), l) if(true, b, l) -> s(0) if(false, b, l) -> if2(b, l) if2(true, l) -> car(l) if2(false, l) -> prod(cons(times(car(l), cadr(l)), cddr(l))) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (33) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (34) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(false, l) -> PROD(cons(times(car(l), cadr(l)), cddr(l))) PROD(l) -> IF(shorter(l, 0), shorter(l, s(0)), l) IF(false, b, l) -> IF2(b, l) The TRS R consists of the following rules: shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) car(cons(x, l)) -> x cadr(cons(x, cons(y, l))) -> y times(x, y) -> iftimes(isZero(x), x, y) cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l isZero(0) -> true isZero(s(x)) -> false iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (35) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. prod(x0) if(true, x0, x1) if(false, x0, x1) if2(true, x0) if2(false, x0) ---------------------------------------- (36) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(false, l) -> PROD(cons(times(car(l), cadr(l)), cddr(l))) PROD(l) -> IF(shorter(l, 0), shorter(l, s(0)), l) IF(false, b, l) -> IF2(b, l) The TRS R consists of the following rules: shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) car(cons(x, l)) -> x cadr(cons(x, cons(y, l))) -> y times(x, y) -> iftimes(isZero(x), x, y) cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l isZero(0) -> true isZero(s(x)) -> false iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (37) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule IF2(false, l) -> PROD(cons(times(car(l), cadr(l)), cddr(l))) at position [0,0] we obtained the following new rules [LPAR04]: (IF2(false, l) -> PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l))),IF2(false, l) -> PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l)))) ---------------------------------------- (38) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(l) -> IF(shorter(l, 0), shorter(l, s(0)), l) IF(false, b, l) -> IF2(b, l) IF2(false, l) -> PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l))) The TRS R consists of the following rules: shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) car(cons(x, l)) -> x cadr(cons(x, cons(y, l))) -> y times(x, y) -> iftimes(isZero(x), x, y) cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l isZero(0) -> true isZero(s(x)) -> false iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (39) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule PROD(l) -> IF(shorter(l, 0), shorter(l, s(0)), l) at position [0] we obtained the following new rules [LPAR04]: (PROD(nil) -> IF(true, shorter(nil, s(0)), nil),PROD(nil) -> IF(true, shorter(nil, s(0)), nil)) (PROD(cons(x0, x1)) -> IF(false, shorter(cons(x0, x1), s(0)), cons(x0, x1)),PROD(cons(x0, x1)) -> IF(false, shorter(cons(x0, x1), s(0)), cons(x0, x1))) ---------------------------------------- (40) Obligation: Q DP problem: The TRS P consists of the following rules: IF(false, b, l) -> IF2(b, l) IF2(false, l) -> PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l))) PROD(nil) -> IF(true, shorter(nil, s(0)), nil) PROD(cons(x0, x1)) -> IF(false, shorter(cons(x0, x1), s(0)), cons(x0, x1)) The TRS R consists of the following rules: shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) car(cons(x, l)) -> x cadr(cons(x, cons(y, l))) -> y times(x, y) -> iftimes(isZero(x), x, y) cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l isZero(0) -> true isZero(s(x)) -> false iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (41) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (42) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(false, l) -> PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l))) PROD(cons(x0, x1)) -> IF(false, shorter(cons(x0, x1), s(0)), cons(x0, x1)) IF(false, b, l) -> IF2(b, l) The TRS R consists of the following rules: shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) car(cons(x, l)) -> x cadr(cons(x, cons(y, l))) -> y times(x, y) -> iftimes(isZero(x), x, y) cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l isZero(0) -> true isZero(s(x)) -> false iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (43) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule PROD(cons(x0, x1)) -> IF(false, shorter(cons(x0, x1), s(0)), cons(x0, x1)) at position [1] we obtained the following new rules [LPAR04]: (PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)),PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1))) ---------------------------------------- (44) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(false, l) -> PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l))) IF(false, b, l) -> IF2(b, l) PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)) The TRS R consists of the following rules: shorter(nil, y) -> true shorter(cons(x, l), 0) -> false shorter(cons(x, l), s(y)) -> shorter(l, y) car(cons(x, l)) -> x cadr(cons(x, cons(y, l))) -> y times(x, y) -> iftimes(isZero(x), x, y) cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l isZero(0) -> true isZero(s(x)) -> false iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (45) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (46) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(false, l) -> PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l))) IF(false, b, l) -> IF2(b, l) PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)) The TRS R consists of the following rules: shorter(nil, y) -> true shorter(cons(x, l), 0) -> false car(cons(x, l)) -> x isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (47) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule IF(false, b, l) -> IF2(b, l) we obtained the following new rules [LPAR04]: (IF(false, y_0, cons(z0, z1)) -> IF2(y_0, cons(z0, z1)),IF(false, y_0, cons(z0, z1)) -> IF2(y_0, cons(z0, z1))) ---------------------------------------- (48) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(false, l) -> PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l))) PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)) IF(false, y_0, cons(z0, z1)) -> IF2(y_0, cons(z0, z1)) The TRS R consists of the following rules: shorter(nil, y) -> true shorter(cons(x, l), 0) -> false car(cons(x, l)) -> x isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (49) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule IF2(false, l) -> PROD(cons(iftimes(isZero(car(l)), car(l), cadr(l)), cddr(l))) we obtained the following new rules [LPAR04]: (IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(car(cons(z1, z2))), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2)))),IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(car(cons(z1, z2))), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2))))) ---------------------------------------- (50) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)) IF(false, y_0, cons(z0, z1)) -> IF2(y_0, cons(z0, z1)) IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(car(cons(z1, z2))), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2)))) The TRS R consists of the following rules: shorter(nil, y) -> true shorter(cons(x, l), 0) -> false car(cons(x, l)) -> x isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(nil) -> nil cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (51) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (52) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)) IF(false, y_0, cons(z0, z1)) -> IF2(y_0, cons(z0, z1)) IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(car(cons(z1, z2))), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2)))) The TRS R consists of the following rules: car(cons(x, l)) -> x isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) shorter(nil, y) -> true shorter(cons(x, l), 0) -> false The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (53) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(car(cons(z1, z2))), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2)))) at position [0,0,0,0] we obtained the following new rules [LPAR04]: (IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2)))),IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2))))) ---------------------------------------- (54) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)) IF(false, y_0, cons(z0, z1)) -> IF2(y_0, cons(z0, z1)) IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2)))) The TRS R consists of the following rules: car(cons(x, l)) -> x isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) shorter(nil, y) -> true shorter(cons(x, l), 0) -> false The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (55) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), car(cons(z1, z2)), cadr(cons(z1, z2))), cddr(cons(z1, z2)))) at position [0,0,1] we obtained the following new rules [LPAR04]: (IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2)))),IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2))))) ---------------------------------------- (56) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)) IF(false, y_0, cons(z0, z1)) -> IF2(y_0, cons(z0, z1)) IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2)))) The TRS R consists of the following rules: car(cons(x, l)) -> x isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) shorter(nil, y) -> true shorter(cons(x, l), 0) -> false The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (57) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (58) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)) IF(false, y_0, cons(z0, z1)) -> IF2(y_0, cons(z0, z1)) IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2)))) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) shorter(nil, y) -> true shorter(cons(x, l), 0) -> false The set Q consists of the following terms: car(cons(x0, x1)) cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (59) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. car(cons(x0, x1)) ---------------------------------------- (60) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)) IF(false, y_0, cons(z0, z1)) -> IF2(y_0, cons(z0, z1)) IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2)))) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) shorter(nil, y) -> true shorter(cons(x, l), 0) -> false The set Q consists of the following terms: cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (61) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule IF(false, y_0, cons(z0, z1)) -> IF2(y_0, cons(z0, z1)) we obtained the following new rules [LPAR04]: (IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)),IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2))) ---------------------------------------- (62) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)) IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2)))) IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) shorter(nil, y) -> true shorter(cons(x, l), 0) -> false The set Q consists of the following terms: cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (63) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule PROD(cons(x0, x1)) -> IF(false, shorter(x1, 0), cons(x0, x1)) at position [1] we obtained the following new rules [LPAR04]: (PROD(cons(y0, nil)) -> IF(false, true, cons(y0, nil)),PROD(cons(y0, nil)) -> IF(false, true, cons(y0, nil))) (PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))),PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1)))) ---------------------------------------- (64) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2)))) IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) PROD(cons(y0, nil)) -> IF(false, true, cons(y0, nil)) PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) shorter(nil, y) -> true shorter(cons(x, l), 0) -> false The set Q consists of the following terms: cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (65) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (66) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2)))) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) shorter(nil, y) -> true shorter(cons(x, l), 0) -> false The set Q consists of the following terms: cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (67) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (68) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2)))) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (69) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. shorter(nil, x0) shorter(cons(x0, x1), 0) shorter(cons(x0, x1), s(x2)) ---------------------------------------- (70) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2)))) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (71) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule IF2(false, cons(z1, z2)) -> PROD(cons(iftimes(isZero(z1), z1, cadr(cons(z1, z2))), cddr(cons(z1, z2)))) at position [0,1] we obtained the following new rules [LPAR04]: (IF2(false, cons(x0, nil)) -> PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, nil))), nil)),IF2(false, cons(x0, nil)) -> PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, nil))), nil))) (IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2)),IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2))) ---------------------------------------- (72) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) IF2(false, cons(x0, nil)) -> PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, nil))), nil)) IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2)) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (73) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (74) Obligation: Q DP problem: The TRS P consists of the following rules: IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2)) PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) cddr(cons(x, nil)) -> nil cddr(cons(x, cons(y, l))) -> l p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (75) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (76) Obligation: Q DP problem: The TRS P consists of the following rules: IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2)) PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (77) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. cddr(nil) cddr(cons(x0, nil)) cddr(cons(x0, cons(x1, x2))) ---------------------------------------- (78) Obligation: Q DP problem: The TRS P consists of the following rules: IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2)) PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (79) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, cadr(cons(x0, cons(x1, x2)))), x2)) at position [0,0,2] we obtained the following new rules [LPAR04]: (IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, x1), x2)),IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, x1), x2))) ---------------------------------------- (80) Obligation: Q DP problem: The TRS P consists of the following rules: IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, x1), x2)) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false cadr(cons(x, cons(y, l))) -> y iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (81) UsableRulesProof (EQUIVALENT) As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R. ---------------------------------------- (82) Obligation: Q DP problem: The TRS P consists of the following rules: IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, x1), x2)) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: cadr(cons(x0, cons(x1, x2))) isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (83) QReductionProof (EQUIVALENT) We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN]. cadr(cons(x0, cons(x1, x2))) ---------------------------------------- (84) Obligation: Q DP problem: The TRS P consists of the following rules: IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, x1), x2)) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (85) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule IF(false, false, cons(x1, x2)) -> IF2(false, cons(x1, x2)) we obtained the following new rules [LPAR04]: (IF(false, false, cons(z0, cons(z1, z2))) -> IF2(false, cons(z0, cons(z1, z2))),IF(false, false, cons(z0, cons(z1, z2))) -> IF2(false, cons(z0, cons(z1, z2)))) ---------------------------------------- (86) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, x1), x2)) IF(false, false, cons(z0, cons(z1, z2))) -> IF2(false, cons(z0, cons(z1, z2))) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (87) QDPOrderProof (EQUIVALENT) We use the reduction pair processor [LPAR04,JAR06]. The following pairs can be oriented strictly and are deleted. IF2(false, cons(x0, cons(x1, x2))) -> PROD(cons(iftimes(isZero(x0), x0, x1), x2)) The remaining pairs can at least be oriented weakly. Used ordering: Combined order from the following AFS and order. PROD(x1) = x1 cons(x1, x2) = cons(x2) IF(x1, x2, x3) = x3 IF2(x1, x2) = x2 false = false Knuth-Bendix order [KBO] with precedence:trivial and weight map: dummyConstant=1 cons_1=1 The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: none ---------------------------------------- (88) Obligation: Q DP problem: The TRS P consists of the following rules: PROD(cons(y0, cons(x0, x1))) -> IF(false, false, cons(y0, cons(x0, x1))) IF(false, false, cons(z0, cons(z1, z2))) -> IF2(false, cons(z0, cons(z1, z2))) The TRS R consists of the following rules: isZero(0) -> true isZero(s(x)) -> false iftimes(true, x, y) -> 0 iftimes(false, x, y) -> plus(y, times(p(x), y)) p(s(x)) -> x p(0) -> 0 times(x, y) -> iftimes(isZero(x), x, y) plus(x, y) -> ifplus(isZero(x), x, y) ifplus(true, x, y) -> y ifplus(false, x, y) -> s(plus(p(x), y)) The set Q consists of the following terms: isZero(0) isZero(s(x0)) plus(x0, x1) ifplus(true, x0, x1) ifplus(false, x0, x1) times(x0, x1) iftimes(true, x0, x1) iftimes(false, x0, x1) p(s(x0)) p(0) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (89) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 2 less nodes. ---------------------------------------- (90) TRUE