/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Termination w.r.t. Q of the given QTRS could be proven: (0) QTRS (1) AAECC Innermost [EQUIVALENT, 0 ms] (2) QTRS (3) DependencyPairsProof [EQUIVALENT, 0 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) QDPSizeChangeProof [EQUIVALENT, 0 ms] (20) YES (21) QDP (22) UsableRulesProof [EQUIVALENT, 0 ms] (23) QDP (24) QReductionProof [EQUIVALENT, 0 ms] (25) QDP (26) NonInfProof [EQUIVALENT, 50 ms] (27) QDP (28) DependencyGraphProof [EQUIVALENT, 0 ms] (29) TRUE (30) QDP (31) UsableRulesProof [EQUIVALENT, 0 ms] (32) QDP (33) QReductionProof [EQUIVALENT, 0 ms] (34) QDP (35) QDPSizeChangeProof [EQUIVALENT, 0 ms] (36) YES (37) QDP (38) UsableRulesProof [EQUIVALENT, 0 ms] (39) QDP (40) QReductionProof [EQUIVALENT, 0 ms] (41) QDP (42) TransformationProof [EQUIVALENT, 0 ms] (43) QDP (44) UsableRulesProof [EQUIVALENT, 0 ms] (45) QDP (46) QReductionProof [EQUIVALENT, 0 ms] (47) QDP (48) TransformationProof [EQUIVALENT, 0 ms] (49) QDP (50) TransformationProof [EQUIVALENT, 0 ms] (51) QDP (52) DependencyGraphProof [EQUIVALENT, 0 ms] (53) QDP (54) TransformationProof [EQUIVALENT, 0 ms] (55) QDP (56) TransformationProof [EQUIVALENT, 0 ms] (57) QDP (58) TransformationProof [EQUIVALENT, 0 ms] (59) QDP (60) TransformationProof [EQUIVALENT, 0 ms] (61) QDP (62) DependencyGraphProof [EQUIVALENT, 0 ms] (63) QDP (64) TransformationProof [EQUIVALENT, 0 ms] (65) QDP (66) DependencyGraphProof [EQUIVALENT, 0 ms] (67) QDP (68) TransformationProof [EQUIVALENT, 0 ms] (69) QDP (70) QDPOrderProof [EQUIVALENT, 49 ms] (71) QDP (72) DependencyGraphProof [EQUIVALENT, 0 ms] (73) TRUE ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: div(x, y) -> div2(x, y, 0) div2(x, y, i) -> if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) if1(true, b, x, y, i, j) -> divZeroError if1(false, b, x, y, i, j) -> if2(b, x, y, i, j) if2(true, x, y, i, j) -> div2(minus(x, y), y, j) if2(false, x, y, i, j) -> i inc(0) -> 0 inc(s(i)) -> s(inc(i)) le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) plus(x, y) -> plusIter(x, y, 0) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) a -> c a -> d Q is empty. ---------------------------------------- (1) AAECC Innermost (EQUIVALENT) We have applied [NOC,AAECCNOC] to switch to innermost. The TRS R 1 is if2(false, x, y, i, j) -> i inc(0) -> 0 inc(s(i)) -> s(inc(i)) le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) plus(x, y) -> plusIter(x, y, 0) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) if1(false, b, x, y, i, j) -> if2(b, x, y, i, j) if2(true, x, y, i, j) -> div2(minus(x, y), y, j) div(x, y) -> div2(x, y, 0) div2(x, y, i) -> if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) if1(true, b, x, y, i, j) -> divZeroError The TRS R 2 is a -> c a -> d The signature Sigma is {a, c, d} ---------------------------------------- (2) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: div(x, y) -> div2(x, y, 0) div2(x, y, i) -> if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) if1(true, b, x, y, i, j) -> divZeroError if1(false, b, x, y, i, j) -> if2(b, x, y, i, j) if2(true, x, y, i, j) -> div2(minus(x, y), y, j) if2(false, x, y, i, j) -> i inc(0) -> 0 inc(s(i)) -> s(inc(i)) le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) plus(x, y) -> plusIter(x, y, 0) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) a -> c a -> d The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a ---------------------------------------- (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: DIV(x, y) -> DIV2(x, y, 0) DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) DIV2(x, y, i) -> LE(y, 0) DIV2(x, y, i) -> LE(y, x) DIV2(x, y, i) -> PLUS(i, 0) DIV2(x, y, i) -> INC(i) IF1(false, b, x, y, i, j) -> IF2(b, x, y, i, j) IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) IF2(true, x, y, i, j) -> MINUS(x, y) INC(s(i)) -> INC(i) LE(s(x), s(y)) -> LE(x, y) MINUS(s(x), s(y)) -> MINUS(x, y) PLUS(x, y) -> PLUSITER(x, y, 0) PLUSITER(x, y, z) -> IFPLUS(le(x, z), x, y, z) PLUSITER(x, y, z) -> LE(x, z) IFPLUS(false, x, y, z) -> PLUSITER(x, s(y), s(z)) The TRS R consists of the following rules: div(x, y) -> div2(x, y, 0) div2(x, y, i) -> if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) if1(true, b, x, y, i, j) -> divZeroError if1(false, b, x, y, i, j) -> if2(b, x, y, i, j) if2(true, x, y, i, j) -> div2(minus(x, y), y, j) if2(false, x, y, i, j) -> i inc(0) -> 0 inc(s(i)) -> s(inc(i)) le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) plus(x, y) -> plusIter(x, y, 0) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) a -> c a -> d The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 5 SCCs with 8 less nodes. ---------------------------------------- (6) Complex Obligation (AND) ---------------------------------------- (7) Obligation: Q DP problem: The TRS P consists of the following rules: MINUS(s(x), s(y)) -> MINUS(x, y) The TRS R consists of the following rules: div(x, y) -> div2(x, y, 0) div2(x, y, i) -> if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) if1(true, b, x, y, i, j) -> divZeroError if1(false, b, x, y, i, j) -> if2(b, x, y, i, j) if2(true, x, y, i, j) -> div2(minus(x, y), y, j) if2(false, x, y, i, j) -> i inc(0) -> 0 inc(s(i)) -> s(inc(i)) le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) plus(x, y) -> plusIter(x, y, 0) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) a -> c a -> d The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a 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: MINUS(s(x), s(y)) -> MINUS(x, y) R is empty. The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a 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]. div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a ---------------------------------------- (11) Obligation: Q DP problem: The TRS P consists of the following rules: MINUS(s(x), s(y)) -> MINUS(x, 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: *MINUS(s(x), s(y)) -> MINUS(x, 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: LE(s(x), s(y)) -> LE(x, y) The TRS R consists of the following rules: div(x, y) -> div2(x, y, 0) div2(x, y, i) -> if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) if1(true, b, x, y, i, j) -> divZeroError if1(false, b, x, y, i, j) -> if2(b, x, y, i, j) if2(true, x, y, i, j) -> div2(minus(x, y), y, j) if2(false, x, y, i, j) -> i inc(0) -> 0 inc(s(i)) -> s(inc(i)) le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) plus(x, y) -> plusIter(x, y, 0) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) a -> c a -> d The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a 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: LE(s(x), s(y)) -> LE(x, y) R is empty. The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a 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]. div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a ---------------------------------------- (18) Obligation: Q DP problem: The TRS P consists of the following rules: LE(s(x), s(y)) -> LE(x, y) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (19) 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: *LE(s(x), s(y)) -> LE(x, y) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (20) YES ---------------------------------------- (21) Obligation: Q DP problem: The TRS P consists of the following rules: PLUSITER(x, y, z) -> IFPLUS(le(x, z), x, y, z) IFPLUS(false, x, y, z) -> PLUSITER(x, s(y), s(z)) The TRS R consists of the following rules: div(x, y) -> div2(x, y, 0) div2(x, y, i) -> if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) if1(true, b, x, y, i, j) -> divZeroError if1(false, b, x, y, i, j) -> if2(b, x, y, i, j) if2(true, x, y, i, j) -> div2(minus(x, y), y, j) if2(false, x, y, i, j) -> i inc(0) -> 0 inc(s(i)) -> s(inc(i)) le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) plus(x, y) -> plusIter(x, y, 0) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) a -> c a -> d The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (22) 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. ---------------------------------------- (23) Obligation: Q DP problem: The TRS P consists of the following rules: PLUSITER(x, y, z) -> IFPLUS(le(x, z), x, y, z) IFPLUS(false, x, y, z) -> PLUSITER(x, s(y), s(z)) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (24) 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]. div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a ---------------------------------------- (25) Obligation: Q DP problem: The TRS P consists of the following rules: PLUSITER(x, y, z) -> IFPLUS(le(x, z), x, y, z) IFPLUS(false, x, y, z) -> PLUSITER(x, s(y), s(z)) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) The set Q consists of the following terms: le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (26) NonInfProof (EQUIVALENT) The DP Problem is simplified using the Induction Calculus [NONINF] with the following steps: Note that final constraints are written in bold face. For Pair PLUSITER(x, y, z) -> IFPLUS(le(x, z), x, y, z) the following chains were created: *We consider the chain IFPLUS(false, x3, x4, x5) -> PLUSITER(x3, s(x4), s(x5)), PLUSITER(x6, x7, x8) -> IFPLUS(le(x6, x8), x6, x7, x8) which results in the following constraint: (1) (PLUSITER(x3, s(x4), s(x5))=PLUSITER(x6, x7, x8) ==> PLUSITER(x6, x7, x8)_>=_IFPLUS(le(x6, x8), x6, x7, x8)) We simplified constraint (1) using rules (I), (II), (III) which results in the following new constraint: (2) (PLUSITER(x3, s(x4), s(x5))_>=_IFPLUS(le(x3, s(x5)), x3, s(x4), s(x5))) For Pair IFPLUS(false, x, y, z) -> PLUSITER(x, s(y), s(z)) the following chains were created: *We consider the chain PLUSITER(x9, x10, x11) -> IFPLUS(le(x9, x11), x9, x10, x11), IFPLUS(false, x12, x13, x14) -> PLUSITER(x12, s(x13), s(x14)) which results in the following constraint: (1) (IFPLUS(le(x9, x11), x9, x10, x11)=IFPLUS(false, x12, x13, x14) ==> IFPLUS(false, x12, x13, x14)_>=_PLUSITER(x12, s(x13), s(x14))) We simplified constraint (1) using rules (I), (II), (III) which results in the following new constraint: (2) (le(x9, x11)=false ==> IFPLUS(false, x9, x10, x11)_>=_PLUSITER(x9, s(x10), s(x11))) We simplified constraint (2) using rule (V) (with possible (I) afterwards) using induction on le(x9, x11)=false which results in the following new constraints: (3) (false=false ==> IFPLUS(false, s(x18), x10, 0)_>=_PLUSITER(s(x18), s(x10), s(0))) (4) (le(x21, x20)=false & (\/x22:le(x21, x20)=false ==> IFPLUS(false, x21, x22, x20)_>=_PLUSITER(x21, s(x22), s(x20))) ==> IFPLUS(false, s(x21), x10, s(x20))_>=_PLUSITER(s(x21), s(x10), s(s(x20)))) We simplified constraint (3) using rules (I), (II) which results in the following new constraint: (5) (IFPLUS(false, s(x18), x10, 0)_>=_PLUSITER(s(x18), s(x10), s(0))) We simplified constraint (4) using rule (VI) where we applied the induction hypothesis (\/x22:le(x21, x20)=false ==> IFPLUS(false, x21, x22, x20)_>=_PLUSITER(x21, s(x22), s(x20))) with sigma = [x22 / x10] which results in the following new constraint: (6) (IFPLUS(false, x21, x10, x20)_>=_PLUSITER(x21, s(x10), s(x20)) ==> IFPLUS(false, s(x21), x10, s(x20))_>=_PLUSITER(s(x21), s(x10), s(s(x20)))) To summarize, we get the following constraints P__>=_ for the following pairs. *PLUSITER(x, y, z) -> IFPLUS(le(x, z), x, y, z) *(PLUSITER(x3, s(x4), s(x5))_>=_IFPLUS(le(x3, s(x5)), x3, s(x4), s(x5))) *IFPLUS(false, x, y, z) -> PLUSITER(x, s(y), s(z)) *(IFPLUS(false, s(x18), x10, 0)_>=_PLUSITER(s(x18), s(x10), s(0))) *(IFPLUS(false, x21, x10, x20)_>=_PLUSITER(x21, s(x10), s(x20)) ==> IFPLUS(false, s(x21), x10, s(x20))_>=_PLUSITER(s(x21), s(x10), s(s(x20)))) The constraints for P_> respective P_bound are constructed from P__>=_ where we just replace every occurence of "t _>=_ s" in P__>=_ by "t > s" respective "t _>=_ c". Here c stands for the fresh constant used for P_bound. Using the following integer polynomial ordering the resulting constraints can be solved Polynomial interpretation [NONINF]: POL(0) = 0 POL(IFPLUS(x_1, x_2, x_3, x_4)) = -1 - x_1 + x_2 - x_4 POL(PLUSITER(x_1, x_2, x_3)) = -1 + x_1 - x_3 POL(c) = -2 POL(false) = 0 POL(le(x_1, x_2)) = 0 POL(s(x_1)) = 1 + x_1 POL(true) = 0 The following pairs are in P_>: IFPLUS(false, x, y, z) -> PLUSITER(x, s(y), s(z)) The following pairs are in P_bound: IFPLUS(false, x, y, z) -> PLUSITER(x, s(y), s(z)) The following rules are usable: false -> le(s(x), 0) true -> le(0, y) le(x, y) -> le(s(x), s(y)) ---------------------------------------- (27) Obligation: Q DP problem: The TRS P consists of the following rules: PLUSITER(x, y, z) -> IFPLUS(le(x, z), x, y, z) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) The set Q consists of the following terms: le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (28) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node. ---------------------------------------- (29) TRUE ---------------------------------------- (30) Obligation: Q DP problem: The TRS P consists of the following rules: INC(s(i)) -> INC(i) The TRS R consists of the following rules: div(x, y) -> div2(x, y, 0) div2(x, y, i) -> if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) if1(true, b, x, y, i, j) -> divZeroError if1(false, b, x, y, i, j) -> if2(b, x, y, i, j) if2(true, x, y, i, j) -> div2(minus(x, y), y, j) if2(false, x, y, i, j) -> i inc(0) -> 0 inc(s(i)) -> s(inc(i)) le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) plus(x, y) -> plusIter(x, y, 0) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) a -> c a -> d The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (31) 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. ---------------------------------------- (32) Obligation: Q DP problem: The TRS P consists of the following rules: INC(s(i)) -> INC(i) R is empty. The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (33) 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]. div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a ---------------------------------------- (34) Obligation: Q DP problem: The TRS P consists of the following rules: INC(s(i)) -> INC(i) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (35) 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: *INC(s(i)) -> INC(i) The graph contains the following edges 1 > 1 ---------------------------------------- (36) YES ---------------------------------------- (37) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(false, b, x, y, i, j) -> IF2(b, x, y, i, j) IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) The TRS R consists of the following rules: div(x, y) -> div2(x, y, 0) div2(x, y, i) -> if1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) if1(true, b, x, y, i, j) -> divZeroError if1(false, b, x, y, i, j) -> if2(b, x, y, i, j) if2(true, x, y, i, j) -> div2(minus(x, y), y, j) if2(false, x, y, i, j) -> i inc(0) -> 0 inc(s(i)) -> s(inc(i)) le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) plus(x, y) -> plusIter(x, y, 0) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) a -> c a -> d The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (38) 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. ---------------------------------------- (39) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(false, b, x, y, i, j) -> IF2(b, x, y, i, j) IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plus(x, y) -> plusIter(x, y, 0) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) a We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (40) 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]. div(x0, x1) div2(x0, x1, x2) if1(true, x0, x1, x2, x3, x4) if1(false, x0, x1, x2, x3, x4) if2(true, x0, x1, x2, x3) if2(false, x0, x1, x2, x3) a ---------------------------------------- (41) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(false, b, x, y, i, j) -> IF2(b, x, y, i, j) IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plus(x, y) -> plusIter(x, y, 0) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (42) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, plus(i, 0), inc(i)) at position [4] we obtained the following new rules [LPAR04]: (DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, plusIter(i, 0, 0), inc(i)),DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, plusIter(i, 0, 0), inc(i))) ---------------------------------------- (43) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(false, b, x, y, i, j) -> IF2(b, x, y, i, j) IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, plusIter(i, 0, 0), inc(i)) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plus(x, y) -> plusIter(x, y, 0) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (44) 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. ---------------------------------------- (45) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(false, b, x, y, i, j) -> IF2(b, x, y, i, j) IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, plusIter(i, 0, 0), inc(i)) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plus(x0, x1) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (46) 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]. plus(x0, x1) ---------------------------------------- (47) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(false, b, x, y, i, j) -> IF2(b, x, y, i, j) IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, plusIter(i, 0, 0), inc(i)) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (48) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, plusIter(i, 0, 0), inc(i)) at position [4] we obtained the following new rules [LPAR04]: (DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, ifPlus(le(i, 0), i, 0, 0), inc(i)),DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, ifPlus(le(i, 0), i, 0, 0), inc(i))) ---------------------------------------- (49) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(false, b, x, y, i, j) -> IF2(b, x, y, i, j) IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, ifPlus(le(i, 0), i, 0, 0), inc(i)) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (50) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule DIV2(x, y, i) -> IF1(le(y, 0), le(y, x), x, y, ifPlus(le(i, 0), i, 0, 0), inc(i)) at position [0] we obtained the following new rules [LPAR04]: (DIV2(y0, s(x0), y2) -> IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)),DIV2(y0, s(x0), y2) -> IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))) (DIV2(y0, 0, y2) -> IF1(true, le(0, y0), y0, 0, ifPlus(le(y2, 0), y2, 0, 0), inc(y2)),DIV2(y0, 0, y2) -> IF1(true, le(0, y0), y0, 0, ifPlus(le(y2, 0), y2, 0, 0), inc(y2))) ---------------------------------------- (51) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(false, b, x, y, i, j) -> IF2(b, x, y, i, j) IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) DIV2(y0, s(x0), y2) -> IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) DIV2(y0, 0, y2) -> IF1(true, le(0, y0), y0, 0, ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (52) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (53) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) DIV2(y0, s(x0), y2) -> IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) IF1(false, b, x, y, i, j) -> IF2(b, x, y, i, j) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (54) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule IF1(false, b, x, y, i, j) -> IF2(b, x, y, i, j) we obtained the following new rules [LPAR04]: (IF1(false, y_0, z0, s(z1), y_2, y_3) -> IF2(y_0, z0, s(z1), y_2, y_3),IF1(false, y_0, z0, s(z1), y_2, y_3) -> IF2(y_0, z0, s(z1), y_2, y_3)) ---------------------------------------- (55) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) DIV2(y0, s(x0), y2) -> IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) IF1(false, y_0, z0, s(z1), y_2, y_3) -> IF2(y_0, z0, s(z1), y_2, y_3) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (56) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule IF2(true, x, y, i, j) -> DIV2(minus(x, y), y, j) we obtained the following new rules [LPAR04]: (IF2(true, z1, s(z2), z3, z4) -> DIV2(minus(z1, s(z2)), s(z2), z4),IF2(true, z1, s(z2), z3, z4) -> DIV2(minus(z1, s(z2)), s(z2), z4)) ---------------------------------------- (57) Obligation: Q DP problem: The TRS P consists of the following rules: DIV2(y0, s(x0), y2) -> IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) IF1(false, y_0, z0, s(z1), y_2, y_3) -> IF2(y_0, z0, s(z1), y_2, y_3) IF2(true, z1, s(z2), z3, z4) -> DIV2(minus(z1, s(z2)), s(z2), z4) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (58) TransformationProof (EQUIVALENT) By forward instantiating [JAR06] the rule IF1(false, y_0, z0, s(z1), y_2, y_3) -> IF2(y_0, z0, s(z1), y_2, y_3) we obtained the following new rules [LPAR04]: (IF1(false, true, x1, s(x2), x3, x4) -> IF2(true, x1, s(x2), x3, x4),IF1(false, true, x1, s(x2), x3, x4) -> IF2(true, x1, s(x2), x3, x4)) ---------------------------------------- (59) Obligation: Q DP problem: The TRS P consists of the following rules: DIV2(y0, s(x0), y2) -> IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) IF2(true, z1, s(z2), z3, z4) -> DIV2(minus(z1, s(z2)), s(z2), z4) IF1(false, true, x1, s(x2), x3, x4) -> IF2(true, x1, s(x2), x3, x4) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (60) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule DIV2(y0, s(x0), y2) -> IF1(false, le(s(x0), y0), y0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) at position [1] we obtained the following new rules [LPAR04]: (DIV2(0, s(x0), y2) -> IF1(false, false, 0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)),DIV2(0, s(x0), y2) -> IF1(false, false, 0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))) (DIV2(s(x1), s(x0), y2) -> IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)),DIV2(s(x1), s(x0), y2) -> IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2))) ---------------------------------------- (61) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, z1, s(z2), z3, z4) -> DIV2(minus(z1, s(z2)), s(z2), z4) IF1(false, true, x1, s(x2), x3, x4) -> IF2(true, x1, s(x2), x3, x4) DIV2(0, s(x0), y2) -> IF1(false, false, 0, s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) DIV2(s(x1), s(x0), y2) -> IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (62) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (63) Obligation: Q DP problem: The TRS P consists of the following rules: DIV2(s(x1), s(x0), y2) -> IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) IF1(false, true, x1, s(x2), x3, x4) -> IF2(true, x1, s(x2), x3, x4) IF2(true, z1, s(z2), z3, z4) -> DIV2(minus(z1, s(z2)), s(z2), z4) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (64) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule IF2(true, z1, s(z2), z3, z4) -> DIV2(minus(z1, s(z2)), s(z2), z4) at position [0] we obtained the following new rules [LPAR04]: (IF2(true, 0, s(y1), y2, y3) -> DIV2(0, s(y1), y3),IF2(true, 0, s(y1), y2, y3) -> DIV2(0, s(y1), y3)) (IF2(true, s(x0), s(x1), y2, y3) -> DIV2(minus(x0, x1), s(x1), y3),IF2(true, s(x0), s(x1), y2, y3) -> DIV2(minus(x0, x1), s(x1), y3)) ---------------------------------------- (65) Obligation: Q DP problem: The TRS P consists of the following rules: DIV2(s(x1), s(x0), y2) -> IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) IF1(false, true, x1, s(x2), x3, x4) -> IF2(true, x1, s(x2), x3, x4) IF2(true, 0, s(y1), y2, y3) -> DIV2(0, s(y1), y3) IF2(true, s(x0), s(x1), y2, y3) -> DIV2(minus(x0, x1), s(x1), y3) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (66) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (67) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(false, true, x1, s(x2), x3, x4) -> IF2(true, x1, s(x2), x3, x4) IF2(true, s(x0), s(x1), y2, y3) -> DIV2(minus(x0, x1), s(x1), y3) DIV2(s(x1), s(x0), y2) -> IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (68) TransformationProof (EQUIVALENT) By instantiating [LPAR04] the rule IF1(false, true, x1, s(x2), x3, x4) -> IF2(true, x1, s(x2), x3, x4) we obtained the following new rules [LPAR04]: (IF1(false, true, s(z0), s(z1), y_2, y_3) -> IF2(true, s(z0), s(z1), y_2, y_3),IF1(false, true, s(z0), s(z1), y_2, y_3) -> IF2(true, s(z0), s(z1), y_2, y_3)) ---------------------------------------- (69) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, s(x0), s(x1), y2, y3) -> DIV2(minus(x0, x1), s(x1), y3) DIV2(s(x1), s(x0), y2) -> IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) IF1(false, true, s(z0), s(z1), y_2, y_3) -> IF2(true, s(z0), s(z1), y_2, y_3) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (70) QDPOrderProof (EQUIVALENT) We use the reduction pair processor [LPAR04,JAR06]. The following pairs can be oriented strictly and are deleted. DIV2(s(x1), s(x0), y2) -> IF1(false, le(x0, x1), s(x1), s(x0), ifPlus(le(y2, 0), y2, 0, 0), inc(y2)) The remaining pairs can at least be oriented weakly. Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation: POL( DIV2_3(x_1, ..., x_3) ) = max{0, 2x_1 - 2} POL( minus_2(x_1, x_2) ) = x_1 POL( 0 ) = 2 POL( s_1(x_1) ) = 2x_1 + 2 POL( IF1_6(x_1, ..., x_6) ) = max{0, 2x_1 + x_3 - 2} POL( ifPlus_4(x_1, ..., x_4) ) = max{0, 2x_2 - 2} POL( le_2(x_1, x_2) ) = 2x_1 + 2x_2 + 2 POL( false ) = 0 POL( true ) = 0 POL( plusIter_3(x_1, ..., x_3) ) = max{0, 2x_1 - 2} POL( inc_1(x_1) ) = 2x_1 POL( IF2_5(x_1, ..., x_5) ) = max{0, 2x_1 + x_2 - 2} The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) ---------------------------------------- (71) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, s(x0), s(x1), y2, y3) -> DIV2(minus(x0, x1), s(x1), y3) IF1(false, true, s(z0), s(z1), y_2, y_3) -> IF2(true, s(z0), s(z1), y_2, y_3) The TRS R consists of the following rules: le(s(x), 0) -> false le(0, y) -> true le(s(x), s(y)) -> le(x, y) plusIter(x, y, z) -> ifPlus(le(x, z), x, y, z) ifPlus(false, x, y, z) -> plusIter(x, s(y), s(z)) inc(0) -> 0 inc(s(i)) -> s(inc(i)) ifPlus(true, x, y, z) -> y minus(x, 0) -> x minus(0, y) -> 0 minus(s(x), s(y)) -> minus(x, y) The set Q consists of the following terms: inc(0) inc(s(x0)) le(s(x0), 0) le(0, x0) le(s(x0), s(x1)) minus(x0, 0) minus(0, x0) minus(s(x0), s(x1)) plusIter(x0, x1, x2) ifPlus(true, x0, x1, x2) ifPlus(false, x0, x1, x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (72) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 2 less nodes. ---------------------------------------- (73) TRUE