/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, 40 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, 12 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, 7 ms] (45) QDP (46) QDPOrderProof [EQUIVALENT, 7 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) -> nil ap(ap(ap(if, false), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(map, f), ap(dropLast, xs))) ap(isEmpty, nil) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> false ap(last, ap(ap(cons, x), nil)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, nil) -> nil ap(dropLast, ap(ap(cons, x), nil)) -> nil 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) -> nil ap(ap(ap(if, false), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(map, f), ap(dropLast, xs))) ap(isEmpty, nil) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> false ap(last, ap(ap(cons, x), nil)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, nil) -> nil ap(dropLast, ap(ap(cons, x), nil)) -> nil 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, false), x0), x1) ap(isEmpty, nil) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), nil)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, nil) ap(dropLast, ap(ap(cons, x0), nil)) 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, false), f), xs) -> AP(ap(cons, ap(f, ap(last, xs))), ap(ap(map, f), ap(dropLast, xs))) AP(ap(ap(if, false), f), xs) -> AP(cons, ap(f, ap(last, xs))) AP(ap(ap(if, false), f), xs) -> AP(f, ap(last, xs)) AP(ap(ap(if, false), f), xs) -> AP(last, xs) AP(ap(ap(if, false), f), xs) -> AP(ap(map, f), ap(dropLast, xs)) AP(ap(ap(if, false), f), xs) -> AP(map, f) AP(ap(ap(if, false), 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) -> nil ap(ap(ap(if, false), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(map, f), ap(dropLast, xs))) ap(isEmpty, nil) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> false ap(last, ap(ap(cons, x), nil)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, nil) -> nil ap(dropLast, ap(ap(cons, x), nil)) -> nil 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, false), x0), x1) ap(isEmpty, nil) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), nil)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, nil) ap(dropLast, ap(ap(cons, x0), nil)) 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 9 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) -> nil ap(ap(ap(if, false), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(map, f), ap(dropLast, xs))) ap(isEmpty, nil) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> false ap(last, ap(ap(cons, x), nil)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, nil) -> nil ap(dropLast, ap(ap(cons, x), nil)) -> nil 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, false), x0), x1) ap(isEmpty, nil) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), nil)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, nil) ap(dropLast, ap(ap(cons, x0), nil)) 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, false), x0), x1) ap(isEmpty, nil) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), nil)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, nil) ap(dropLast, ap(ap(cons, x0), nil)) 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(false, x0, x1) isEmpty(nil) isEmpty(cons(x0, x1)) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) dropLast(nil) dropLast(cons(x0, nil)) 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(false, x0, x1) isEmpty(nil) isEmpty(cons(x0, x1)) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) dropLast(nil) dropLast(cons(x0, nil)) 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) -> nil ap(ap(ap(if, false), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(map, f), ap(dropLast, xs))) ap(isEmpty, nil) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> false ap(last, ap(ap(cons, x), nil)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, nil) -> nil ap(dropLast, ap(ap(cons, x), nil)) -> nil 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, false), x0), x1) ap(isEmpty, nil) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), nil)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, nil) ap(dropLast, ap(ap(cons, x0), nil)) 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, false), x0), x1) ap(isEmpty, nil) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), nil)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, nil) ap(dropLast, ap(ap(cons, x0), nil)) 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(false, x0, x1) isEmpty(nil) isEmpty(cons(x0, x1)) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) dropLast(nil) dropLast(cons(x0, nil)) 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(false, x0, x1) isEmpty(nil) isEmpty(cons(x0, x1)) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) dropLast(nil) dropLast(cons(x0, nil)) 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, false), 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, false), 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) -> nil ap(ap(ap(if, false), f), xs) -> ap(ap(cons, ap(f, ap(last, xs))), ap(ap(map, f), ap(dropLast, xs))) ap(isEmpty, nil) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> false ap(last, ap(ap(cons, x), nil)) -> x ap(last, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(last, ap(ap(cons, y), ys)) ap(dropLast, nil) -> nil ap(dropLast, ap(ap(cons, x), nil)) -> nil 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, false), x0), x1) ap(isEmpty, nil) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), nil)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, nil) ap(dropLast, ap(ap(cons, x0), nil)) 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, false), 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, false), f), xs) -> AP(ap(map, f), ap(dropLast, xs)) The TRS R consists of the following rules: ap(dropLast, nil) -> nil ap(dropLast, ap(ap(cons, x), nil)) -> nil ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) ap(isEmpty, nil) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> false ap(last, ap(ap(cons, x), nil)) -> 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, false), x0), x1) ap(isEmpty, nil) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), nil)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, nil) ap(dropLast, ap(ap(cons, x0), nil)) 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, false), 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, false), f), xs) -> AP(ap(map, f), ap(dropLast, xs)) The TRS R consists of the following rules: ap(dropLast, nil) -> nil ap(dropLast, ap(ap(cons, x), nil)) -> nil ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) ap(isEmpty, nil) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> false ap(last, ap(ap(cons, x), nil)) -> 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, false), x0), x1) ap(isEmpty, nil) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), nil)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, nil) ap(dropLast, ap(ap(cons, x0), nil)) 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, false), f), xs) -> AP(ap(map, f), ap(dropLast, xs)) The TRS R consists of the following rules: ap(dropLast, nil) -> nil ap(dropLast, ap(ap(cons, x), nil)) -> nil ap(dropLast, ap(ap(cons, x), ap(ap(cons, y), ys))) -> ap(ap(cons, x), ap(dropLast, ap(ap(cons, y), ys))) ap(isEmpty, nil) -> true ap(isEmpty, ap(ap(cons, x), xs)) -> false The set Q consists of the following terms: ap(ap(map, x0), x1) ap(ap(ap(if, true), x0), x1) ap(ap(ap(if, false), x0), x1) ap(isEmpty, nil) ap(isEmpty, ap(ap(cons, x0), x1)) ap(last, ap(ap(cons, x0), nil)) ap(last, ap(ap(cons, x0), ap(ap(cons, x1), x2))) ap(dropLast, nil) ap(dropLast, ap(ap(cons, x0), nil)) 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(false, f, xs) -> map1(f, dropLast(xs)) The TRS R consists of the following rules: dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false The set Q consists of the following terms: map(x0, x1) if(true, x0, x1) if(false, x0, x1) isEmpty(nil) isEmpty(cons(x0, x1)) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) dropLast(nil) dropLast(cons(x0, nil)) 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(false, x0, x1) last(cons(x0, nil)) 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(false, f, xs) -> map1(f, dropLast(xs)) The TRS R consists of the following rules: dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false The set Q consists of the following terms: isEmpty(nil) isEmpty(cons(x0, x1)) dropLast(nil) dropLast(cons(x0, nil)) 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, nil) -> if1(true, y0, nil),map1(y0, nil) -> if1(true, y0, nil)) (map1(y0, cons(x0, x1)) -> if1(false, y0, cons(x0, x1)),map1(y0, cons(x0, x1)) -> if1(false, y0, cons(x0, x1))) ---------------------------------------- (37) Obligation: Q DP problem: The TRS P consists of the following rules: if1(false, f, xs) -> map1(f, dropLast(xs)) map1(y0, nil) -> if1(true, y0, nil) map1(y0, cons(x0, x1)) -> if1(false, y0, cons(x0, x1)) The TRS R consists of the following rules: dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false The set Q consists of the following terms: isEmpty(nil) isEmpty(cons(x0, x1)) dropLast(nil) dropLast(cons(x0, nil)) 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: map1(y0, cons(x0, x1)) -> if1(false, y0, cons(x0, x1)) if1(false, f, xs) -> map1(f, dropLast(xs)) The TRS R consists of the following rules: dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) isEmpty(nil) -> true isEmpty(cons(x, xs)) -> false The set Q consists of the following terms: isEmpty(nil) isEmpty(cons(x0, x1)) dropLast(nil) dropLast(cons(x0, nil)) 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: map1(y0, cons(x0, x1)) -> if1(false, y0, cons(x0, x1)) if1(false, f, xs) -> map1(f, dropLast(xs)) The TRS R consists of the following rules: dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) The set Q consists of the following terms: isEmpty(nil) isEmpty(cons(x0, x1)) dropLast(nil) dropLast(cons(x0, nil)) 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(nil) isEmpty(cons(x0, x1)) ---------------------------------------- (43) Obligation: Q DP problem: The TRS P consists of the following rules: map1(y0, cons(x0, x1)) -> if1(false, y0, cons(x0, x1)) if1(false, f, xs) -> map1(f, dropLast(xs)) The TRS R consists of the following rules: dropLast(nil) -> nil dropLast(cons(x, nil)) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) The set Q consists of the following terms: dropLast(nil) dropLast(cons(x0, nil)) 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, nil)) -> nil Used ordering: Polynomial interpretation [POLO]: POL(cons(x_1, x_2)) = x_1 + 2*x_2 POL(dropLast(x_1)) = x_1 POL(false) = 0 POL(if1(x_1, x_2, x_3)) = 2*x_1 + x_2 + x_3 POL(map1(x_1, x_2)) = x_1 + x_2 POL(nil) = 1 ---------------------------------------- (45) Obligation: Q DP problem: The TRS P consists of the following rules: map1(y0, cons(x0, x1)) -> if1(false, y0, cons(x0, x1)) if1(false, f, xs) -> map1(f, dropLast(xs)) The TRS R consists of the following rules: dropLast(nil) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) The set Q consists of the following terms: dropLast(nil) dropLast(cons(x0, nil)) 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(false, y0, cons(x0, x1)) The remaining pairs can at least be oriented weakly. Used ordering: Matrix interpretation [MATRO] to (N^2, +, *, >=, >) : <<< POL(map1(x_1, x_2)) = [[0]] + [[1, 1]] * x_1 + [[1, 0]] * x_2 >>> <<< 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(false) = [[0], [0]] >>> <<< POL(dropLast(x_1)) = [[0], [0]] + [[0, 1], [1, 0]] * x_1 >>> <<< POL(nil) = [[1], [1]] >>> The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented: dropLast(nil) -> nil 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: if1(false, f, xs) -> map1(f, dropLast(xs)) The TRS R consists of the following rules: dropLast(nil) -> nil dropLast(cons(x, cons(y, ys))) -> cons(x, dropLast(cons(y, ys))) The set Q consists of the following terms: dropLast(nil) dropLast(cons(x0, nil)) 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 1 less node. ---------------------------------------- (49) TRUE