/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) Overlay + Local Confluence [EQUIVALENT, 0 ms] (2) QTRS (3) DependencyPairsProof [EQUIVALENT, 15 ms] (4) QDP (5) DependencyGraphProof [EQUIVALENT, 0 ms] (6) AND (7) QDP (8) UsableRulesProof [EQUIVALENT, 0 ms] (9) QDP (10) ATransformationProof [EQUIVALENT, 0 ms] (11) QDP (12) QReductionProof [EQUIVALENT, 0 ms] (13) QDP (14) QDPSizeChangeProof [EQUIVALENT, 0 ms] (15) YES (16) QDP (17) UsableRulesProof [EQUIVALENT, 0 ms] (18) QDP (19) ATransformationProof [EQUIVALENT, 0 ms] (20) QDP (21) QReductionProof [EQUIVALENT, 0 ms] (22) QDP (23) QDPSizeChangeProof [EQUIVALENT, 0 ms] (24) YES (25) QDP (26) UsableRulesProof [EQUIVALENT, 0 ms] (27) QDP (28) QDPOrderProof [EQUIVALENT, 27 ms] (29) QDP (30) UsableRulesProof [EQUIVALENT, 0 ms] (31) QDP (32) ATransformationProof [EQUIVALENT, 0 ms] (33) QDP (34) QReductionProof [EQUIVALENT, 0 ms] (35) QDP (36) TransformationProof [EQUIVALENT, 0 ms] (37) QDP (38) DependencyGraphProof [EQUIVALENT, 0 ms] (39) QDP (40) UsableRulesProof [EQUIVALENT, 0 ms] (41) QDP (42) QReductionProof [EQUIVALENT, 0 ms] (43) QDP (44) MRRProof [EQUIVALENT, 0 ms] (45) QDP (46) QDPOrderProof [EQUIVALENT, 0 ms] (47) QDP (48) DependencyGraphProof [EQUIVALENT, 0 ms] (49) TRUE ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: ap(ap(map, f), xs) -> ap(ap(ap(if, ap(isEmpty, xs)), f), xs) ap(ap(ap(if, true), f), xs) -> null ap(ap(ap(if, null), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs)) ap(ap(if2, f), xs) -> ap(ap(map, f), ap(dropLast, xs)) ap(isEmpty, null) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> null ap(last, ap(ap(cons, x), null)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, ap(ap(cons, x), null)) -> null ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) 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: ap(ap(map, f), xs) -> ap(ap(ap(if, ap(isEmpty, xs)), f), xs) ap(ap(ap(if, true), f), xs) -> null ap(ap(ap(if, null), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs)) ap(ap(if2, f), xs) -> ap(ap(map, f), ap(dropLast, xs)) ap(isEmpty, null) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> null ap(last, ap(ap(cons, x), null)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, ap(ap(cons, x), null)) -> null ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) The set Q consists of the following terms: ap(ap(map, x0), x1) ap(ap(ap(if, true), x0), x1) ap(ap(ap(if, null), x0), x1) ap(ap(if2, x0), x1) ap(isEmpty, null) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), null)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, ap(ap(cons, x0), null)) ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ---------------------------------------- (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: AP(ap(map, f), xs) -> AP(ap(ap(if, ap(isEmpty, xs)), f), xs) AP(ap(map, f), xs) -> AP(ap(if, ap(isEmpty, xs)), f) AP(ap(map, f), xs) -> AP(if, ap(isEmpty, xs)) AP(ap(map, f), xs) -> AP(isEmpty, xs) AP(ap(ap(if, null), f), xs) -> AP(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs)) AP(ap(ap(if, null), f), xs) -> AP(cons, ap(f, ap(last, xs))) AP(ap(ap(if, null), f), xs) -> AP(f, ap(last, xs)) AP(ap(ap(if, null), f), xs) -> AP(last, xs) AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs) AP(ap(ap(if, null), f), xs) -> AP(if2, f) AP(ap(if2, f), xs) -> AP(ap(map, f), ap(dropLast, xs)) AP(ap(if2, f), xs) -> AP(map, f) AP(ap(if2, f), xs) -> AP(dropLast, xs) AP(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(last, ap(ap(cons, y), ys)) AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(dropLast, ap(ap(cons, y), ys)) The TRS R consists of the following rules: ap(ap(map, f), xs) -> ap(ap(ap(if, ap(isEmpty, xs)), f), xs) ap(ap(ap(if, true), f), xs) -> null ap(ap(ap(if, null), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs)) ap(ap(if2, f), xs) -> ap(ap(map, f), ap(dropLast, xs)) ap(isEmpty, null) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> null ap(last, ap(ap(cons, x), null)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, ap(ap(cons, x), null)) -> null ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) The set Q consists of the following terms: ap(ap(map, x0), x1) ap(ap(ap(if, true), x0), x1) ap(ap(ap(if, null), x0), x1) ap(ap(if2, x0), x1) ap(isEmpty, null) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), null)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, ap(ap(cons, x0), null)) ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2))) 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 10 less nodes. ---------------------------------------- (6) Complex Obligation (AND) ---------------------------------------- (7) Obligation: Q DP problem: The TRS P consists of the following rules: AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(dropLast, ap(ap(cons, y), ys)) The TRS R consists of the following rules: ap(ap(map, f), xs) -> ap(ap(ap(if, ap(isEmpty, xs)), f), xs) ap(ap(ap(if, true), f), xs) -> null ap(ap(ap(if, null), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs)) ap(ap(if2, f), xs) -> ap(ap(map, f), ap(dropLast, xs)) ap(isEmpty, null) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> null ap(last, ap(ap(cons, x), null)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, ap(ap(cons, x), null)) -> null ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) The set Q consists of the following terms: ap(ap(map, x0), x1) ap(ap(ap(if, true), x0), x1) ap(ap(ap(if, null), x0), x1) ap(ap(if2, x0), x1) ap(isEmpty, null) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), null)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, ap(ap(cons, x0), null)) ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2))) 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: AP(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(dropLast, ap(ap(cons, y), ys)) R is empty. The set Q consists of the following terms: ap(ap(map, x0), x1) ap(ap(ap(if, true), x0), x1) ap(ap(ap(if, null), x0), x1) ap(ap(if2, x0), x1) ap(isEmpty, null) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), null)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, ap(ap(cons, x0), null)) ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (10) ATransformationProof (EQUIVALENT) We have applied the A-Transformation [FROCOS05] to get from an applicative problem to a standard problem. ---------------------------------------- (11) Obligation: Q DP problem: The TRS P consists of the following rules: dropLast1(cons(x, cons(y, ys))) -> dropLast1(cons(y, ys)) R is empty. The set Q consists of the following terms: map(x0, x1) if(true, x0, x1) if(null, x0, x1) if2(x0, x1) isEmpty(null) isEmpty(cons(x0, x1)) last(cons(x0, null)) last(cons(x0, cons(x1, x2))) dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (12) 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]. map(x0, x1) if(true, x0, x1) if(null, x0, x1) if2(x0, x1) isEmpty(null) isEmpty(cons(x0, x1)) last(cons(x0, null)) last(cons(x0, cons(x1, x2))) dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) ---------------------------------------- (13) Obligation: Q DP problem: The TRS P consists of the following rules: dropLast1(cons(x, cons(y, ys))) -> dropLast1(cons(y, ys)) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (14) 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: *dropLast1(cons(x, cons(y, ys))) -> dropLast1(cons(y, ys)) The graph contains the following edges 1 > 1 ---------------------------------------- (15) YES ---------------------------------------- (16) Obligation: Q DP problem: The TRS P consists of the following rules: AP(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(last, ap(ap(cons, y), ys)) The TRS R consists of the following rules: ap(ap(map, f), xs) -> ap(ap(ap(if, ap(isEmpty, xs)), f), xs) ap(ap(ap(if, true), f), xs) -> null ap(ap(ap(if, null), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs)) ap(ap(if2, f), xs) -> ap(ap(map, f), ap(dropLast, xs)) ap(isEmpty, null) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> null ap(last, ap(ap(cons, x), null)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, ap(ap(cons, x), null)) -> null ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) The set Q consists of the following terms: ap(ap(map, x0), x1) ap(ap(ap(if, true), x0), x1) ap(ap(ap(if, null), x0), x1) ap(ap(if2, x0), x1) ap(isEmpty, null) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), null)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, ap(ap(cons, x0), null)) ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (17) 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. ---------------------------------------- (18) Obligation: Q DP problem: The TRS P consists of the following rules: AP(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> AP(last, ap(ap(cons, y), ys)) R is empty. The set Q consists of the following terms: ap(ap(map, x0), x1) ap(ap(ap(if, true), x0), x1) ap(ap(ap(if, null), x0), x1) ap(ap(if2, x0), x1) ap(isEmpty, null) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), null)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, ap(ap(cons, x0), null)) ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (19) ATransformationProof (EQUIVALENT) We have applied the A-Transformation [FROCOS05] to get from an applicative problem to a standard problem. ---------------------------------------- (20) Obligation: Q DP problem: The TRS P consists of the following rules: last1(cons(x, cons(y, ys))) -> last1(cons(y, ys)) R is empty. The set Q consists of the following terms: map(x0, x1) if(true, x0, x1) if(null, x0, x1) if2(x0, x1) isEmpty(null) isEmpty(cons(x0, x1)) last(cons(x0, null)) last(cons(x0, cons(x1, x2))) dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (21) 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]. map(x0, x1) if(true, x0, x1) if(null, x0, x1) if2(x0, x1) isEmpty(null) isEmpty(cons(x0, x1)) last(cons(x0, null)) last(cons(x0, cons(x1, x2))) dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) ---------------------------------------- (22) Obligation: Q DP problem: The TRS P consists of the following rules: last1(cons(x, cons(y, ys))) -> last1(cons(y, ys)) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (23) 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: *last1(cons(x, cons(y, ys))) -> last1(cons(y, ys)) The graph contains the following edges 1 > 1 ---------------------------------------- (24) YES ---------------------------------------- (25) Obligation: Q DP problem: The TRS P consists of the following rules: AP(ap(ap(if, null), f), xs) -> AP(f, ap(last, xs)) AP(ap(map, f), xs) -> AP(ap(ap(if, ap(isEmpty, xs)), f), xs) AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs) AP(ap(if2, f), xs) -> AP(ap(map, f), ap(dropLast, xs)) The TRS R consists of the following rules: ap(ap(map, f), xs) -> ap(ap(ap(if, ap(isEmpty, xs)), f), xs) ap(ap(ap(if, true), f), xs) -> null ap(ap(ap(if, null), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(if2, f), xs)) ap(ap(if2, f), xs) -> ap(ap(map, f), ap(dropLast, xs)) ap(isEmpty, null) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> null ap(last, ap(ap(cons, x), null)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, ap(ap(cons, x), null)) -> null ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) The set Q consists of the following terms: ap(ap(map, x0), x1) ap(ap(ap(if, true), x0), x1) ap(ap(ap(if, null), x0), x1) ap(ap(if2, x0), x1) ap(isEmpty, null) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), null)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, ap(ap(cons, x0), null)) ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (26) 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. ---------------------------------------- (27) Obligation: Q DP problem: The TRS P consists of the following rules: AP(ap(ap(if, null), f), xs) -> AP(f, ap(last, xs)) AP(ap(map, f), xs) -> AP(ap(ap(if, ap(isEmpty, xs)), f), xs) AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs) AP(ap(if2, f), xs) -> AP(ap(map, f), ap(dropLast, xs)) The TRS R consists of the following rules: ap(dropLast, ap(ap(cons, x), null)) -> null ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) ap(isEmpty, null) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> null ap(last, ap(ap(cons, x), null)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) The set Q consists of the following terms: ap(ap(map, x0), x1) ap(ap(ap(if, true), x0), x1) ap(ap(ap(if, null), x0), x1) ap(ap(if2, x0), x1) ap(isEmpty, null) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), null)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, ap(ap(cons, x0), null)) ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2))) 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. AP(ap(ap(if, null), f), xs) -> AP(f, ap(last, xs)) The remaining pairs can at least be oriented weakly. Used ordering: Combined order from the following AFS and order. AP(x1, x2) = x1 ap(x1, x2) = ap(x2) Knuth-Bendix order [KBO] with precedence:trivial and weight map: dummyConstant=1 ap_1=1 The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: none ---------------------------------------- (29) Obligation: Q DP problem: The TRS P consists of the following rules: AP(ap(map, f), xs) -> AP(ap(ap(if, ap(isEmpty, xs)), f), xs) AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs) AP(ap(if2, f), xs) -> AP(ap(map, f), ap(dropLast, xs)) The TRS R consists of the following rules: ap(dropLast, ap(ap(cons, x), null)) -> null ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) ap(isEmpty, null) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> null ap(last, ap(ap(cons, x), null)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) The set Q consists of the following terms: ap(ap(map, x0), x1) ap(ap(ap(if, true), x0), x1) ap(ap(ap(if, null), x0), x1) ap(ap(if2, x0), x1) ap(isEmpty, null) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), null)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, ap(ap(cons, x0), null)) ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (30) 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. ---------------------------------------- (31) Obligation: Q DP problem: The TRS P consists of the following rules: AP(ap(map, f), xs) -> AP(ap(ap(if, ap(isEmpty, xs)), f), xs) AP(ap(ap(if, null), f), xs) -> AP(ap(if2, f), xs) AP(ap(if2, f), xs) -> AP(ap(map, f), ap(dropLast, xs)) The TRS R consists of the following rules: ap(dropLast, ap(ap(cons, x), null)) -> null ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) ap(isEmpty, null) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> null The set Q consists of the following terms: ap(ap(map, x0), x1) ap(ap(ap(if, true), x0), x1) ap(ap(ap(if, null), x0), x1) ap(ap(if2, x0), x1) ap(isEmpty, null) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), null)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, ap(ap(cons, x0), null)) ap(dropLast, ap(ap(cons, x0), ap(ap(cons, x1), x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (32) ATransformationProof (EQUIVALENT) We have applied the A-Transformation [FROCOS05] to get from an applicative problem to a standard problem. ---------------------------------------- (33) Obligation: Q DP problem: The TRS P consists of the following rules: map1(f, xs) -> if1(isEmpty(xs), f, xs) if1(null, f, xs) -> if21(f, xs) if21(f, xs) -> map1(f, dropLast(xs)) The TRS R consists of the following rules: dropLast(cons(x, null)) -> null dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) isEmpty(null) -> true isEmpty(cons(x, xs)) -> null The set Q consists of the following terms: map(x0, x1) if(true, x0, x1) if(null, x0, x1) if2(x0, x1) isEmpty(null) isEmpty(cons(x0, x1)) last(cons(x0, null)) last(cons(x0, cons(x1, x2))) dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (34) 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]. map(x0, x1) if(true, x0, x1) if(null, x0, x1) if2(x0, x1) last(cons(x0, null)) last(cons(x0, cons(x1, x2))) ---------------------------------------- (35) Obligation: Q DP problem: The TRS P consists of the following rules: map1(f, xs) -> if1(isEmpty(xs), f, xs) if1(null, f, xs) -> if21(f, xs) if21(f, xs) -> map1(f, dropLast(xs)) The TRS R consists of the following rules: dropLast(cons(x, null)) -> null dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) isEmpty(null) -> true isEmpty(cons(x, xs)) -> null The set Q consists of the following terms: isEmpty(null) isEmpty(cons(x0, x1)) dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (36) TransformationProof (EQUIVALENT) By narrowing [LPAR04] the rule map1(f, xs) -> if1(isEmpty(xs), f, xs) at position [0] we obtained the following new rules [LPAR04]: (map1(y0, null) -> if1(true, y0, null),map1(y0, null) -> if1(true, y0, null)) (map1(y0, cons(x0, x1)) -> if1(null, y0, cons(x0, x1)),map1(y0, cons(x0, x1)) -> if1(null, y0, cons(x0, x1))) ---------------------------------------- (37) Obligation: Q DP problem: The TRS P consists of the following rules: if1(null, f, xs) -> if21(f, xs) if21(f, xs) -> map1(f, dropLast(xs)) map1(y0, null) -> if1(true, y0, null) map1(y0, cons(x0, x1)) -> if1(null, y0, cons(x0, x1)) The TRS R consists of the following rules: dropLast(cons(x, null)) -> null dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) isEmpty(null) -> true isEmpty(cons(x, xs)) -> null The set Q consists of the following terms: isEmpty(null) isEmpty(cons(x0, x1)) dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (38) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node. ---------------------------------------- (39) Obligation: Q DP problem: The TRS P consists of the following rules: if21(f, xs) -> map1(f, dropLast(xs)) map1(y0, cons(x0, x1)) -> if1(null, y0, cons(x0, x1)) if1(null, f, xs) -> if21(f, xs) The TRS R consists of the following rules: dropLast(cons(x, null)) -> null dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) isEmpty(null) -> true isEmpty(cons(x, xs)) -> null The set Q consists of the following terms: isEmpty(null) isEmpty(cons(x0, x1)) dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (40) 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. ---------------------------------------- (41) Obligation: Q DP problem: The TRS P consists of the following rules: if21(f, xs) -> map1(f, dropLast(xs)) map1(y0, cons(x0, x1)) -> if1(null, y0, cons(x0, x1)) if1(null, f, xs) -> if21(f, xs) The TRS R consists of the following rules: dropLast(cons(x, null)) -> null dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) The set Q consists of the following terms: isEmpty(null) isEmpty(cons(x0, x1)) dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (42) 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]. isEmpty(null) isEmpty(cons(x0, x1)) ---------------------------------------- (43) Obligation: Q DP problem: The TRS P consists of the following rules: if21(f, xs) -> map1(f, dropLast(xs)) map1(y0, cons(x0, x1)) -> if1(null, y0, cons(x0, x1)) if1(null, f, xs) -> if21(f, xs) The TRS R consists of the following rules: dropLast(cons(x, null)) -> null dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) The set Q consists of the following terms: dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (44) MRRProof (EQUIVALENT) By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented. Strictly oriented rules of the TRS R: dropLast(cons(x, null)) -> null Used ordering: Polynomial interpretation [POLO]: POL(cons(x_1, x_2)) = 2 + x_1 + x_2 POL(dropLast(x_1)) = x_1 POL(if1(x_1, x_2, x_3)) = 2*x_1 + x_2 + x_3 POL(if21(x_1, x_2)) = x_1 + x_2 POL(map1(x_1, x_2)) = x_1 + x_2 POL(null) = 0 ---------------------------------------- (45) Obligation: Q DP problem: The TRS P consists of the following rules: if21(f, xs) -> map1(f, dropLast(xs)) map1(y0, cons(x0, x1)) -> if1(null, y0, cons(x0, x1)) if1(null, f, xs) -> if21(f, xs) The TRS R consists of the following rules: dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) The set Q consists of the following terms: dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (46) QDPOrderProof (EQUIVALENT) We use the reduction pair processor [LPAR04,JAR06]. The following pairs can be oriented strictly and are deleted. map1(y0, cons(x0, x1)) -> if1(null, y0, cons(x0, x1)) The remaining pairs can at least be oriented weakly. Used ordering: Matrix interpretation [MATRO] to (N^2, +, *, >=, >) : <<< POL(if21(x_1, x_2)) = [[0]] + [[1, 1]] * x_1 + [[0, 1]] * x_2 >>> <<< POL(map1(x_1, x_2)) = [[0]] + [[1, 1]] * x_1 + [[1, 0]] * x_2 >>> <<< POL(dropLast(x_1)) = [[0], [0]] + [[0, 1], [1, 0]] * x_1 >>> <<< POL(cons(x_1, x_2)) = [[1], [0]] + [[0, 0], [0, 0]] * x_1 + [[1, 0], [1, 0]] * x_2 >>> <<< POL(if1(x_1, x_2, x_3)) = [[0]] + [[1, 1]] * x_1 + [[1, 1]] * x_2 + [[0, 1]] * x_3 >>> <<< POL(null) = [[0], [0]] >>> The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) ---------------------------------------- (47) Obligation: Q DP problem: The TRS P consists of the following rules: if21(f, xs) -> map1(f, dropLast(xs)) if1(null, f, xs) -> if21(f, xs) The TRS R consists of the following rules: dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) The set Q consists of the following terms: dropLast(cons(x0, null)) dropLast(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (48) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 2 less nodes. ---------------------------------------- (49) TRUE