/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/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) Overlay + Local Confluence [EQUIVALENT, 11 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, 34 ms] (27) QDP (28) DependencyGraphProof [EQUIVALENT, 0 ms] (29) TRUE ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: nthtail(n, l) -> cond(ge(n, length(l)), n, l) cond(true, n, l) -> l cond(false, n, l) -> tail(nthtail(s(n), l)) tail(nil) -> nil tail(cons(x, l)) -> l length(nil) -> 0 length(cons(x, l)) -> s(length(l)) ge(u, 0) -> true ge(0, s(v)) -> false ge(s(u), s(v)) -> ge(u, v) 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: nthtail(n, l) -> cond(ge(n, length(l)), n, l) cond(true, n, l) -> l cond(false, n, l) -> tail(nthtail(s(n), l)) tail(nil) -> nil tail(cons(x, l)) -> l length(nil) -> 0 length(cons(x, l)) -> s(length(l)) ge(u, 0) -> true ge(0, s(v)) -> false ge(s(u), s(v)) -> ge(u, v) The set Q consists of the following terms: nthtail(x0, x1) cond(true, x0, x1) cond(false, x0, x1) tail(nil) tail(cons(x0, x1)) length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) ---------------------------------------- (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: NTHTAIL(n, l) -> COND(ge(n, length(l)), n, l) NTHTAIL(n, l) -> GE(n, length(l)) NTHTAIL(n, l) -> LENGTH(l) COND(false, n, l) -> TAIL(nthtail(s(n), l)) COND(false, n, l) -> NTHTAIL(s(n), l) LENGTH(cons(x, l)) -> LENGTH(l) GE(s(u), s(v)) -> GE(u, v) The TRS R consists of the following rules: nthtail(n, l) -> cond(ge(n, length(l)), n, l) cond(true, n, l) -> l cond(false, n, l) -> tail(nthtail(s(n), l)) tail(nil) -> nil tail(cons(x, l)) -> l length(nil) -> 0 length(cons(x, l)) -> s(length(l)) ge(u, 0) -> true ge(0, s(v)) -> false ge(s(u), s(v)) -> ge(u, v) The set Q consists of the following terms: nthtail(x0, x1) cond(true, x0, x1) cond(false, x0, x1) tail(nil) tail(cons(x0, x1)) length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 3 SCCs with 3 less nodes. ---------------------------------------- (6) Complex Obligation (AND) ---------------------------------------- (7) Obligation: Q DP problem: The TRS P consists of the following rules: GE(s(u), s(v)) -> GE(u, v) The TRS R consists of the following rules: nthtail(n, l) -> cond(ge(n, length(l)), n, l) cond(true, n, l) -> l cond(false, n, l) -> tail(nthtail(s(n), l)) tail(nil) -> nil tail(cons(x, l)) -> l length(nil) -> 0 length(cons(x, l)) -> s(length(l)) ge(u, 0) -> true ge(0, s(v)) -> false ge(s(u), s(v)) -> ge(u, v) The set Q consists of the following terms: nthtail(x0, x1) cond(true, x0, x1) cond(false, x0, x1) tail(nil) tail(cons(x0, x1)) length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) 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: GE(s(u), s(v)) -> GE(u, v) R is empty. The set Q consists of the following terms: nthtail(x0, x1) cond(true, x0, x1) cond(false, x0, x1) tail(nil) tail(cons(x0, x1)) length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) 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]. nthtail(x0, x1) cond(true, x0, x1) cond(false, x0, x1) tail(nil) tail(cons(x0, x1)) length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) ---------------------------------------- (11) Obligation: Q DP problem: The TRS P consists of the following rules: GE(s(u), s(v)) -> GE(u, v) 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: *GE(s(u), s(v)) -> GE(u, v) 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: LENGTH(cons(x, l)) -> LENGTH(l) The TRS R consists of the following rules: nthtail(n, l) -> cond(ge(n, length(l)), n, l) cond(true, n, l) -> l cond(false, n, l) -> tail(nthtail(s(n), l)) tail(nil) -> nil tail(cons(x, l)) -> l length(nil) -> 0 length(cons(x, l)) -> s(length(l)) ge(u, 0) -> true ge(0, s(v)) -> false ge(s(u), s(v)) -> ge(u, v) The set Q consists of the following terms: nthtail(x0, x1) cond(true, x0, x1) cond(false, x0, x1) tail(nil) tail(cons(x0, x1)) length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) 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: LENGTH(cons(x, l)) -> LENGTH(l) R is empty. The set Q consists of the following terms: nthtail(x0, x1) cond(true, x0, x1) cond(false, x0, x1) tail(nil) tail(cons(x0, x1)) length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) 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]. nthtail(x0, x1) cond(true, x0, x1) cond(false, x0, x1) tail(nil) tail(cons(x0, x1)) length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) ---------------------------------------- (18) Obligation: Q DP problem: The TRS P consists of the following rules: LENGTH(cons(x, l)) -> LENGTH(l) 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: *LENGTH(cons(x, l)) -> LENGTH(l) The graph contains the following edges 1 > 1 ---------------------------------------- (20) YES ---------------------------------------- (21) Obligation: Q DP problem: The TRS P consists of the following rules: COND(false, n, l) -> NTHTAIL(s(n), l) NTHTAIL(n, l) -> COND(ge(n, length(l)), n, l) The TRS R consists of the following rules: nthtail(n, l) -> cond(ge(n, length(l)), n, l) cond(true, n, l) -> l cond(false, n, l) -> tail(nthtail(s(n), l)) tail(nil) -> nil tail(cons(x, l)) -> l length(nil) -> 0 length(cons(x, l)) -> s(length(l)) ge(u, 0) -> true ge(0, s(v)) -> false ge(s(u), s(v)) -> ge(u, v) The set Q consists of the following terms: nthtail(x0, x1) cond(true, x0, x1) cond(false, x0, x1) tail(nil) tail(cons(x0, x1)) length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) 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: COND(false, n, l) -> NTHTAIL(s(n), l) NTHTAIL(n, l) -> COND(ge(n, length(l)), n, l) The TRS R consists of the following rules: length(nil) -> 0 length(cons(x, l)) -> s(length(l)) ge(u, 0) -> true ge(0, s(v)) -> false ge(s(u), s(v)) -> ge(u, v) The set Q consists of the following terms: nthtail(x0, x1) cond(true, x0, x1) cond(false, x0, x1) tail(nil) tail(cons(x0, x1)) length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) 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]. nthtail(x0, x1) cond(true, x0, x1) cond(false, x0, x1) tail(nil) tail(cons(x0, x1)) ---------------------------------------- (25) Obligation: Q DP problem: The TRS P consists of the following rules: COND(false, n, l) -> NTHTAIL(s(n), l) NTHTAIL(n, l) -> COND(ge(n, length(l)), n, l) The TRS R consists of the following rules: length(nil) -> 0 length(cons(x, l)) -> s(length(l)) ge(u, 0) -> true ge(0, s(v)) -> false ge(s(u), s(v)) -> ge(u, v) The set Q consists of the following terms: length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(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 COND(false, n, l) -> NTHTAIL(s(n), l) the following chains were created: *We consider the chain NTHTAIL(x2, x3) -> COND(ge(x2, length(x3)), x2, x3), COND(false, x4, x5) -> NTHTAIL(s(x4), x5) which results in the following constraint: (1) (COND(ge(x2, length(x3)), x2, x3)=COND(false, x4, x5) ==> COND(false, x4, x5)_>=_NTHTAIL(s(x4), x5)) We simplified constraint (1) using rules (I), (II), (III), (VII) which results in the following new constraint: (2) (length(x3)=x12 & ge(x2, x12)=false ==> COND(false, x2, x3)_>=_NTHTAIL(s(x2), x3)) We simplified constraint (2) using rule (V) (with possible (I) afterwards) using induction on ge(x2, x12)=false which results in the following new constraints: (3) (false=false & length(x3)=s(x14) ==> COND(false, 0, x3)_>=_NTHTAIL(s(0), x3)) (4) (ge(x16, x15)=false & length(x3)=s(x15) & (\/x17:ge(x16, x15)=false & length(x17)=x15 ==> COND(false, x16, x17)_>=_NTHTAIL(s(x16), x17)) ==> COND(false, s(x16), x3)_>=_NTHTAIL(s(s(x16)), x3)) We simplified constraint (3) using rules (I), (II) which results in the following new constraint: (5) (length(x3)=s(x14) ==> COND(false, 0, x3)_>=_NTHTAIL(s(0), x3)) We simplified constraint (4) using rule (V) (with possible (I) afterwards) using induction on length(x3)=s(x15) which results in the following new constraint: (6) (s(length(x21))=s(x15) & ge(x16, x15)=false & (\/x17:ge(x16, x15)=false & length(x17)=x15 ==> COND(false, x16, x17)_>=_NTHTAIL(s(x16), x17)) & (\/x23,x24,x25:length(x21)=s(x23) & ge(x24, x23)=false & (\/x25:ge(x24, x23)=false & length(x25)=x23 ==> COND(false, x24, x25)_>=_NTHTAIL(s(x24), x25)) ==> COND(false, s(x24), x21)_>=_NTHTAIL(s(s(x24)), x21)) ==> COND(false, s(x16), cons(x22, x21))_>=_NTHTAIL(s(s(x16)), cons(x22, x21))) We simplified constraint (5) using rule (V) (with possible (I) afterwards) using induction on length(x3)=s(x14) which results in the following new constraint: (7) (s(length(x18))=s(x14) & (\/x20:length(x18)=s(x20) ==> COND(false, 0, x18)_>=_NTHTAIL(s(0), x18)) ==> COND(false, 0, cons(x19, x18))_>=_NTHTAIL(s(0), cons(x19, x18))) We simplified constraint (7) using rules (I), (II), (IV) which results in the following new constraint: (8) (COND(false, 0, cons(x19, x18))_>=_NTHTAIL(s(0), cons(x19, x18))) We simplified constraint (6) using rules (I), (II) which results in the following new constraint: (9) (length(x21)=x15 & ge(x16, x15)=false & (\/x17:ge(x16, x15)=false & length(x17)=x15 ==> COND(false, x16, x17)_>=_NTHTAIL(s(x16), x17)) & (\/x23,x24,x25:length(x21)=s(x23) & ge(x24, x23)=false & (\/x25:ge(x24, x23)=false & length(x25)=x23 ==> COND(false, x24, x25)_>=_NTHTAIL(s(x24), x25)) ==> COND(false, s(x24), x21)_>=_NTHTAIL(s(s(x24)), x21)) ==> COND(false, s(x16), cons(x22, x21))_>=_NTHTAIL(s(s(x16)), cons(x22, x21))) We simplified constraint (9) using rule (VI) where we applied the induction hypothesis (\/x17:ge(x16, x15)=false & length(x17)=x15 ==> COND(false, x16, x17)_>=_NTHTAIL(s(x16), x17)) with sigma = [x17 / x21] which results in the following new constraint: (10) (COND(false, x16, x21)_>=_NTHTAIL(s(x16), x21) & (\/x23,x24,x25:length(x21)=s(x23) & ge(x24, x23)=false & (\/x25:ge(x24, x23)=false & length(x25)=x23 ==> COND(false, x24, x25)_>=_NTHTAIL(s(x24), x25)) ==> COND(false, s(x24), x21)_>=_NTHTAIL(s(s(x24)), x21)) ==> COND(false, s(x16), cons(x22, x21))_>=_NTHTAIL(s(s(x16)), cons(x22, x21))) We simplified constraint (10) using rule (IV) which results in the following new constraint: (11) (COND(false, x16, x21)_>=_NTHTAIL(s(x16), x21) ==> COND(false, s(x16), cons(x22, x21))_>=_NTHTAIL(s(s(x16)), cons(x22, x21))) For Pair NTHTAIL(n, l) -> COND(ge(n, length(l)), n, l) the following chains were created: *We consider the chain COND(false, x6, x7) -> NTHTAIL(s(x6), x7), NTHTAIL(x8, x9) -> COND(ge(x8, length(x9)), x8, x9) which results in the following constraint: (1) (NTHTAIL(s(x6), x7)=NTHTAIL(x8, x9) ==> NTHTAIL(x8, x9)_>=_COND(ge(x8, length(x9)), x8, x9)) We simplified constraint (1) using rules (I), (II), (III) which results in the following new constraint: (2) (NTHTAIL(s(x6), x7)_>=_COND(ge(s(x6), length(x7)), s(x6), x7)) To summarize, we get the following constraints P__>=_ for the following pairs. *COND(false, n, l) -> NTHTAIL(s(n), l) *(COND(false, 0, cons(x19, x18))_>=_NTHTAIL(s(0), cons(x19, x18))) *(COND(false, x16, x21)_>=_NTHTAIL(s(x16), x21) ==> COND(false, s(x16), cons(x22, x21))_>=_NTHTAIL(s(s(x16)), cons(x22, x21))) *NTHTAIL(n, l) -> COND(ge(n, length(l)), n, l) *(NTHTAIL(s(x6), x7)_>=_COND(ge(s(x6), length(x7)), s(x6), x7)) 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(COND(x_1, x_2, x_3)) = -1 + x_1 - x_2 + x_3 POL(NTHTAIL(x_1, x_2)) = -1 - x_1 + x_2 POL(c) = -2 POL(cons(x_1, x_2)) = 1 + x_1 + x_2 POL(false) = 0 POL(ge(x_1, x_2)) = 0 POL(length(x_1)) = 0 POL(nil) = 1 POL(s(x_1)) = 1 + x_1 POL(true) = 0 The following pairs are in P_>: COND(false, n, l) -> NTHTAIL(s(n), l) The following pairs are in P_bound: COND(false, n, l) -> NTHTAIL(s(n), l) The following rules are usable: ge(u, 0) -> true ge(0, s(v)) -> false ge(s(u), s(v)) -> ge(u, v) ---------------------------------------- (27) Obligation: Q DP problem: The TRS P consists of the following rules: NTHTAIL(n, l) -> COND(ge(n, length(l)), n, l) The TRS R consists of the following rules: length(nil) -> 0 length(cons(x, l)) -> s(length(l)) ge(u, 0) -> true ge(0, s(v)) -> false ge(s(u), s(v)) -> ge(u, v) The set Q consists of the following terms: length(nil) length(cons(x0, x1)) ge(x0, 0) ge(0, s(x0)) ge(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