/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, 10 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) TransformationProof [EQUIVALENT, 3 ms] (20) QDP (21) DependencyGraphProof [EQUIVALENT, 0 ms] (22) QDP (23) TransformationProof [EQUIVALENT, 0 ms] (24) QDP (25) TransformationProof [EQUIVALENT, 0 ms] (26) QDP (27) TransformationProof [EQUIVALENT, 0 ms] (28) QDP (29) QDPOrderProof [EQUIVALENT, 41 ms] (30) QDP (31) DependencyGraphProof [EQUIVALENT, 0 ms] (32) TRUE ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) less_leaves(u, v) -> if1(isLeaf(u), isLeaf(v), u, v) if1(b, true, u, v) -> false if1(b, false, u, v) -> if2(b, u, v) if2(true, u, v) -> true if2(false, u, v) -> less_leaves(concat(left(u), right(u)), concat(left(v), right(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: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) less_leaves(u, v) -> if1(isLeaf(u), isLeaf(v), u, v) if1(b, true, u, v) -> false if1(b, false, u, v) -> if2(b, u, v) if2(true, u, v) -> true if2(false, u, v) -> less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) less_leaves(x0, x1) if1(x0, true, x1, x2) if1(x0, false, x1, x2) if2(true, x0, x1) if2(false, x0, 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: CONCAT(cons(u, v), y) -> CONCAT(v, y) LESS_LEAVES(u, v) -> IF1(isLeaf(u), isLeaf(v), u, v) LESS_LEAVES(u, v) -> ISLEAF(u) LESS_LEAVES(u, v) -> ISLEAF(v) IF1(b, false, u, v) -> IF2(b, u, v) IF2(false, u, v) -> LESS_LEAVES(concat(left(u), right(u)), concat(left(v), right(v))) IF2(false, u, v) -> CONCAT(left(u), right(u)) IF2(false, u, v) -> LEFT(u) IF2(false, u, v) -> RIGHT(u) IF2(false, u, v) -> CONCAT(left(v), right(v)) IF2(false, u, v) -> LEFT(v) IF2(false, u, v) -> RIGHT(v) The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) less_leaves(u, v) -> if1(isLeaf(u), isLeaf(v), u, v) if1(b, true, u, v) -> false if1(b, false, u, v) -> if2(b, u, v) if2(true, u, v) -> true if2(false, u, v) -> less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) less_leaves(x0, x1) if1(x0, true, x1, x2) if1(x0, false, x1, x2) if2(true, x0, x1) if2(false, x0, x1) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs with 8 less nodes. ---------------------------------------- (6) Complex Obligation (AND) ---------------------------------------- (7) Obligation: Q DP problem: The TRS P consists of the following rules: CONCAT(cons(u, v), y) -> CONCAT(v, y) The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) less_leaves(u, v) -> if1(isLeaf(u), isLeaf(v), u, v) if1(b, true, u, v) -> false if1(b, false, u, v) -> if2(b, u, v) if2(true, u, v) -> true if2(false, u, v) -> less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) less_leaves(x0, x1) if1(x0, true, x1, x2) if1(x0, false, x1, x2) if2(true, x0, x1) if2(false, x0, 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: CONCAT(cons(u, v), y) -> CONCAT(v, y) R is empty. The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) less_leaves(x0, x1) if1(x0, true, x1, x2) if1(x0, false, x1, x2) if2(true, x0, x1) if2(false, x0, 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]. isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) less_leaves(x0, x1) if1(x0, true, x1, x2) if1(x0, false, x1, x2) if2(true, x0, x1) if2(false, x0, x1) ---------------------------------------- (11) Obligation: Q DP problem: The TRS P consists of the following rules: CONCAT(cons(u, v), y) -> CONCAT(v, 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: *CONCAT(cons(u, v), y) -> CONCAT(v, 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: IF2(false, u, v) -> LESS_LEAVES(concat(left(u), right(u)), concat(left(v), right(v))) LESS_LEAVES(u, v) -> IF1(isLeaf(u), isLeaf(v), u, v) IF1(b, false, u, v) -> IF2(b, u, v) The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) less_leaves(u, v) -> if1(isLeaf(u), isLeaf(v), u, v) if1(b, true, u, v) -> false if1(b, false, u, v) -> if2(b, u, v) if2(true, u, v) -> true if2(false, u, v) -> less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) less_leaves(x0, x1) if1(x0, true, x1, x2) if1(x0, false, x1, x2) if2(true, x0, x1) if2(false, x0, 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: IF2(false, u, v) -> LESS_LEAVES(concat(left(u), right(u)), concat(left(v), right(v))) LESS_LEAVES(u, v) -> IF1(isLeaf(u), isLeaf(v), u, v) IF1(b, false, u, v) -> IF2(b, u, v) The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) less_leaves(x0, x1) if1(x0, true, x1, x2) if1(x0, false, x1, x2) if2(true, x0, x1) if2(false, x0, 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]. less_leaves(x0, x1) if1(x0, true, x1, x2) if1(x0, false, x1, x2) if2(true, x0, x1) if2(false, x0, x1) ---------------------------------------- (18) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(false, u, v) -> LESS_LEAVES(concat(left(u), right(u)), concat(left(v), right(v))) LESS_LEAVES(u, v) -> IF1(isLeaf(u), isLeaf(v), u, v) IF1(b, false, u, v) -> IF2(b, u, v) The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (19) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule LESS_LEAVES(u, v) -> IF1(isLeaf(u), isLeaf(v), u, v) at position [1] we obtained the following new rules [LPAR04]: (LESS_LEAVES(y0, leaf) -> IF1(isLeaf(y0), true, y0, leaf),LESS_LEAVES(y0, leaf) -> IF1(isLeaf(y0), true, y0, leaf)) (LESS_LEAVES(y0, cons(x0, x1)) -> IF1(isLeaf(y0), false, y0, cons(x0, x1)),LESS_LEAVES(y0, cons(x0, x1)) -> IF1(isLeaf(y0), false, y0, cons(x0, x1))) ---------------------------------------- (20) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(false, u, v) -> LESS_LEAVES(concat(left(u), right(u)), concat(left(v), right(v))) IF1(b, false, u, v) -> IF2(b, u, v) LESS_LEAVES(y0, leaf) -> IF1(isLeaf(y0), true, y0, leaf) LESS_LEAVES(y0, cons(x0, x1)) -> IF1(isLeaf(y0), false, y0, cons(x0, x1)) The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (21) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (22) Obligation: Q DP problem: The TRS P consists of the following rules: LESS_LEAVES(y0, cons(x0, x1)) -> IF1(isLeaf(y0), false, y0, cons(x0, x1)) IF1(b, false, u, v) -> IF2(b, u, v) IF2(false, u, v) -> LESS_LEAVES(concat(left(u), right(u)), concat(left(v), right(v))) The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (23) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule IF2(false, u, v) -> LESS_LEAVES(concat(left(u), right(u)), concat(left(v), right(v))) at position [1] we obtained the following new rules [LPAR04]: (IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(x0, right(cons(x0, x1)))),IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(x0, right(cons(x0, x1))))) (IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(left(cons(x0, x1)), x1)),IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(left(cons(x0, x1)), x1))) ---------------------------------------- (24) Obligation: Q DP problem: The TRS P consists of the following rules: LESS_LEAVES(y0, cons(x0, x1)) -> IF1(isLeaf(y0), false, y0, cons(x0, x1)) IF1(b, false, u, v) -> IF2(b, u, v) IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(x0, right(cons(x0, x1)))) IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(left(cons(x0, x1)), x1)) The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (25) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(x0, right(cons(x0, x1)))) at position [1,1] we obtained the following new rules [LPAR04]: (IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(x0, x1)),IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(x0, x1))) ---------------------------------------- (26) Obligation: Q DP problem: The TRS P consists of the following rules: LESS_LEAVES(y0, cons(x0, x1)) -> IF1(isLeaf(y0), false, y0, cons(x0, x1)) IF1(b, false, u, v) -> IF2(b, u, v) IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(left(cons(x0, x1)), x1)) IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(x0, x1)) The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (27) TransformationProof (EQUIVALENT) By rewriting [LPAR04] the rule IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(left(cons(x0, x1)), x1)) at position [1,0] we obtained the following new rules [LPAR04]: (IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(x0, x1)),IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(x0, x1))) ---------------------------------------- (28) Obligation: Q DP problem: The TRS P consists of the following rules: LESS_LEAVES(y0, cons(x0, x1)) -> IF1(isLeaf(y0), false, y0, cons(x0, x1)) IF1(b, false, u, v) -> IF2(b, u, v) IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(x0, x1)) The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (29) QDPOrderProof (EQUIVALENT) We use the reduction pair processor [LPAR04,JAR06]. The following pairs can be oriented strictly and are deleted. IF2(false, y0, cons(x0, x1)) -> LESS_LEAVES(concat(left(y0), right(y0)), concat(x0, x1)) The remaining pairs can at least be oriented weakly. Used ordering: Combined order from the following AFS and order. LESS_LEAVES(x1, x2) = x2 cons(x1, x2) = cons(x1, x2) IF1(x1, x2, x3, x4) = x4 IF2(x1, x2, x3) = x3 concat(x1, x2) = concat(x1, x2) leaf = leaf Knuth-Bendix order [KBO] with precedence:concat_2 > cons_2 and weight map: cons_2=2 concat_2=1 leaf=1 The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) ---------------------------------------- (30) Obligation: Q DP problem: The TRS P consists of the following rules: LESS_LEAVES(y0, cons(x0, x1)) -> IF1(isLeaf(y0), false, y0, cons(x0, x1)) IF1(b, false, u, v) -> IF2(b, u, v) The TRS R consists of the following rules: isLeaf(leaf) -> true isLeaf(cons(u, v)) -> false left(cons(u, v)) -> u right(cons(u, v)) -> v concat(leaf, y) -> y concat(cons(u, v), y) -> cons(u, concat(v, y)) The set Q consists of the following terms: isLeaf(leaf) isLeaf(cons(x0, x1)) left(cons(x0, x1)) right(cons(x0, x1)) concat(leaf, x0) concat(cons(x0, x1), x2) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (31) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 2 less nodes. ---------------------------------------- (32) TRUE