/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, 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) QDPSizeChangeProof [EQUIVALENT, 0 ms] (27) YES (28) QDP (29) UsableRulesProof [EQUIVALENT, 0 ms] (30) QDP (31) QReductionProof [EQUIVALENT, 0 ms] (32) QDP (33) QDPSizeChangeProof [EQUIVALENT, 0 ms] (34) YES (35) QDP (36) UsableRulesProof [EQUIVALENT, 0 ms] (37) QDP (38) QReductionProof [EQUIVALENT, 0 ms] (39) QDP (40) QDPSizeChangeProof [EQUIVALENT, 0 ms] (41) YES (42) QDP (43) UsableRulesProof [EQUIVALENT, 0 ms] (44) QDP (45) QReductionProof [EQUIVALENT, 0 ms] (46) QDP (47) Induction-Processor [SOUND, 47 ms] (48) AND (49) QDP (50) UsableRulesProof [EQUIVALENT, 0 ms] (51) QDP (52) QReductionProof [EQUIVALENT, 0 ms] (53) QDP (54) Induction-Processor [SOUND, 26 ms] (55) AND (56) QDP (57) PisEmptyProof [EQUIVALENT, 0 ms] (58) YES (59) QTRS (60) QTRSRRRProof [EQUIVALENT, 69 ms] (61) QTRS (62) QTRSRRRProof [EQUIVALENT, 0 ms] (63) QTRS (64) RisEmptyProof [EQUIVALENT, 0 ms] (65) YES (66) QTRS (67) QTRSRRRProof [EQUIVALENT, 105 ms] (68) QTRS (69) QTRSRRRProof [EQUIVALENT, 0 ms] (70) QTRS (71) QTRSRRRProof [EQUIVALENT, 0 ms] (72) QTRS (73) RisEmptyProof [EQUIVALENT, 0 ms] (74) YES ---------------------------------------- (0) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) 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: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, 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: QSORT(cons(x, xs)) -> APPEND(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) QSORT(cons(x, xs)) -> QSORT(filterlow(last(cons(x, xs)), cons(x, xs))) QSORT(cons(x, xs)) -> FILTERLOW(last(cons(x, xs)), cons(x, xs)) QSORT(cons(x, xs)) -> LAST(cons(x, xs)) QSORT(cons(x, xs)) -> QSORT(filterhigh(last(cons(x, xs)), cons(x, xs))) QSORT(cons(x, xs)) -> FILTERHIGH(last(cons(x, xs)), cons(x, xs)) FILTERLOW(n, cons(x, xs)) -> IF1(ge(n, x), n, x, xs) FILTERLOW(n, cons(x, xs)) -> GE(n, x) IF1(true, n, x, xs) -> FILTERLOW(n, xs) IF1(false, n, x, xs) -> FILTERLOW(n, xs) FILTERHIGH(n, cons(x, xs)) -> IF2(ge(x, n), n, x, xs) FILTERHIGH(n, cons(x, xs)) -> GE(x, n) IF2(true, n, x, xs) -> FILTERHIGH(n, xs) IF2(false, n, x, xs) -> FILTERHIGH(n, xs) GE(s(x), s(y)) -> GE(x, y) APPEND(cons(x, xs), ys) -> APPEND(xs, ys) LAST(cons(x, cons(y, xs))) -> LAST(cons(y, xs)) The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, 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 6 SCCs with 6 less nodes. ---------------------------------------- (6) Complex Obligation (AND) ---------------------------------------- (7) Obligation: Q DP problem: The TRS P consists of the following rules: LAST(cons(x, cons(y, xs))) -> LAST(cons(y, xs)) The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, 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: LAST(cons(x, cons(y, xs))) -> LAST(cons(y, xs)) R is empty. The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) 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]. qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) ---------------------------------------- (11) Obligation: Q DP problem: The TRS P consists of the following rules: LAST(cons(x, cons(y, xs))) -> LAST(cons(y, xs)) 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: *LAST(cons(x, cons(y, xs))) -> LAST(cons(y, xs)) The graph contains the following edges 1 > 1 ---------------------------------------- (13) YES ---------------------------------------- (14) Obligation: Q DP problem: The TRS P consists of the following rules: APPEND(cons(x, xs), ys) -> APPEND(xs, ys) The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) 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: APPEND(cons(x, xs), ys) -> APPEND(xs, ys) R is empty. The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) 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]. qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) ---------------------------------------- (18) Obligation: Q DP problem: The TRS P consists of the following rules: APPEND(cons(x, xs), ys) -> APPEND(xs, ys) 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: *APPEND(cons(x, xs), ys) -> APPEND(xs, ys) 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: GE(s(x), s(y)) -> GE(x, y) The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) 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: GE(s(x), s(y)) -> GE(x, y) R is empty. The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) 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]. qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) ---------------------------------------- (25) Obligation: Q DP problem: The TRS P consists of the following rules: GE(s(x), s(y)) -> GE(x, y) R is empty. Q is empty. We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (26) 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(x), s(y)) -> GE(x, y) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (27) YES ---------------------------------------- (28) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, n, x, xs) -> FILTERHIGH(n, xs) FILTERHIGH(n, cons(x, xs)) -> IF2(ge(x, n), n, x, xs) IF2(false, n, x, xs) -> FILTERHIGH(n, xs) The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (29) 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. ---------------------------------------- (30) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, n, x, xs) -> FILTERHIGH(n, xs) FILTERHIGH(n, cons(x, xs)) -> IF2(ge(x, n), n, x, xs) IF2(false, n, x, xs) -> FILTERHIGH(n, xs) The TRS R consists of the following rules: ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (31) 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]. qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) ---------------------------------------- (32) Obligation: Q DP problem: The TRS P consists of the following rules: IF2(true, n, x, xs) -> FILTERHIGH(n, xs) FILTERHIGH(n, cons(x, xs)) -> IF2(ge(x, n), n, x, xs) IF2(false, n, x, xs) -> FILTERHIGH(n, xs) The TRS R consists of the following rules: ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) The set Q consists of the following terms: ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (33) 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: *FILTERHIGH(n, cons(x, xs)) -> IF2(ge(x, n), n, x, xs) The graph contains the following edges 1 >= 2, 2 > 3, 2 > 4 *IF2(true, n, x, xs) -> FILTERHIGH(n, xs) The graph contains the following edges 2 >= 1, 4 >= 2 *IF2(false, n, x, xs) -> FILTERHIGH(n, xs) The graph contains the following edges 2 >= 1, 4 >= 2 ---------------------------------------- (34) YES ---------------------------------------- (35) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(true, n, x, xs) -> FILTERLOW(n, xs) FILTERLOW(n, cons(x, xs)) -> IF1(ge(n, x), n, x, xs) IF1(false, n, x, xs) -> FILTERLOW(n, xs) The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (36) 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. ---------------------------------------- (37) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(true, n, x, xs) -> FILTERLOW(n, xs) FILTERLOW(n, cons(x, xs)) -> IF1(ge(n, x), n, x, xs) IF1(false, n, x, xs) -> FILTERLOW(n, xs) The TRS R consists of the following rules: ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (38) 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]. qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) ---------------------------------------- (39) Obligation: Q DP problem: The TRS P consists of the following rules: IF1(true, n, x, xs) -> FILTERLOW(n, xs) FILTERLOW(n, cons(x, xs)) -> IF1(ge(n, x), n, x, xs) IF1(false, n, x, xs) -> FILTERLOW(n, xs) The TRS R consists of the following rules: ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) The set Q consists of the following terms: ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (40) 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: *FILTERLOW(n, cons(x, xs)) -> IF1(ge(n, x), n, x, xs) The graph contains the following edges 1 >= 2, 2 > 3, 2 > 4 *IF1(true, n, x, xs) -> FILTERLOW(n, xs) The graph contains the following edges 2 >= 1, 4 >= 2 *IF1(false, n, x, xs) -> FILTERLOW(n, xs) The graph contains the following edges 2 >= 1, 4 >= 2 ---------------------------------------- (41) YES ---------------------------------------- (42) Obligation: Q DP problem: The TRS P consists of the following rules: QSORT(cons(x, xs)) -> QSORT(filterhigh(last(cons(x, xs)), cons(x, xs))) QSORT(cons(x, xs)) -> QSORT(filterlow(last(cons(x, xs)), cons(x, xs))) The TRS R consists of the following rules: qsort(nil) -> nil qsort(cons(x, xs)) -> append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs))))) filterlow(n, nil) -> nil filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterhigh(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) append(nil, ys) -> ys append(cons(x, xs), ys) -> cons(x, append(xs, ys)) last(nil) -> 0 last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (43) 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. ---------------------------------------- (44) Obligation: Q DP problem: The TRS P consists of the following rules: QSORT(cons(x, xs)) -> QSORT(filterhigh(last(cons(x, xs)), cons(x, xs))) QSORT(cons(x, xs)) -> QSORT(filterlow(last(cons(x, xs)), cons(x, xs))) The TRS R consists of the following rules: last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterlow(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) filterhigh(n, nil) -> nil The set Q consists of the following terms: qsort(nil) qsort(cons(x0, x1)) filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) append(nil, ys) append(cons(x0, x1), ys) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (45) 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]. qsort(nil) qsort(cons(x0, x1)) append(nil, ys) append(cons(x0, x1), ys) ---------------------------------------- (46) Obligation: Q DP problem: The TRS P consists of the following rules: QSORT(cons(x, xs)) -> QSORT(filterhigh(last(cons(x, xs)), cons(x, xs))) QSORT(cons(x, xs)) -> QSORT(filterlow(last(cons(x, xs)), cons(x, xs))) The TRS R consists of the following rules: last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterlow(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) filterhigh(n, nil) -> nil The set Q consists of the following terms: filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (47) Induction-Processor (SOUND) This DP could be deleted by the Induction-Processor: QSORT(cons(x, xs)) -> QSORT(filterhigh(last(cons(x, xs)), cons(x, xs))) This order was computed: Polynomial interpretation [POLO]: POL(0) = 0 POL(QSORT(x_1)) = x_1 POL(cons(x_1, x_2)) = 1 + 2*x_1 + x_2 POL(false_renamed) = 0 POL(filterhigh(x_1, x_2)) = x_2 POL(filterlow(x_1, x_2)) = x_2 POL(ge(x_1, x_2)) = 0 POL(if1(x_1, x_2, x_3, x_4)) = 1 + 2*x_3 + x_4 POL(if2(x_1, x_2, x_3, x_4)) = 1 + 2*x_3 + x_4 POL(last(x_1)) = x_1 POL(nil) = 0 POL(s(x_1)) = 2 + 3*x_1 POL(true_renamed) = 0 At least one of these decreasing rules is always used after the deleted DP: if2(true_renamed, n3, x9, xs5) -> filterhigh(n3, xs5) The following formula is valid: z0:sort[a37].(~(z0=nil)->filterhigh'(last(z0), z0)=true) The transformed set: filterhigh'(n2, cons(x8, xs4)) -> if2'(ge(x8, n2), n2, x8, xs4) if2'(true_renamed, n3, x9, xs5) -> true if2'(false_renamed, n4, x10, xs6) -> filterhigh'(n4, xs6) filterhigh'(n5, nil) -> false last(cons(x'', nil)) -> x'' last(cons(x1, cons(y, xs''))) -> last(cons(y, xs'')) filterlow(n, cons(x2, xs1)) -> if1(ge(n, x2), n, x2, xs1) if1(true_renamed, n', x3, xs2) -> filterlow(n', xs2) ge(x4, 0) -> true_renamed ge(0, s(x5)) -> false_renamed ge(s(x6), s(y')) -> ge(x6, y') if1(false_renamed, n'', x7, xs3) -> cons(x7, filterlow(n'', xs3)) filterlow(n1, nil) -> nil filterhigh(n2, cons(x8, xs4)) -> if2(ge(x8, n2), n2, x8, xs4) if2(true_renamed, n3, x9, xs5) -> filterhigh(n3, xs5) if2(false_renamed, n4, x10, xs6) -> cons(x10, filterhigh(n4, xs6)) filterhigh(n5, nil) -> nil last(nil) -> 0 equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v26)) -> false equal_sort[a0](s(v27), 0) -> false equal_sort[a0](s(v27), s(v28)) -> equal_sort[a0](v27, v28) equal_sort[a37](cons(v29, v30), cons(v31, v32)) -> and(equal_sort[a0](v29, v31), equal_sort[a37](v30, v32)) equal_sort[a37](cons(v29, v30), nil) -> false equal_sort[a37](nil, cons(v33, v34)) -> false equal_sort[a37](nil, nil) -> true equal_sort[a48](true_renamed, true_renamed) -> true equal_sort[a48](true_renamed, false_renamed) -> false equal_sort[a48](false_renamed, true_renamed) -> false equal_sort[a48](false_renamed, false_renamed) -> true equal_sort[a63](witness_sort[a63], witness_sort[a63]) -> true The proof given by the theorem prover: The following output was given by the internal theorem prover:proof of internal # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Partial correctness of the following Program [x, v26, v27, v28, v29, v30, v31, v32, v33, v34, n3, x9, xs5, n4, x10, x8, xs4, n5, n2, x'', x1, y, xs'', x4, x5, x6, y', n1, n, x2, xs1, n', x3, n'', x7] equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true true and x -> x false and x -> false true or x -> true false or x -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v26)) -> false equal_sort[a0](s(v27), 0) -> false equal_sort[a0](s(v27), s(v28)) -> equal_sort[a0](v27, v28) equal_sort[a37](cons(v29, v30), cons(v31, v32)) -> equal_sort[a0](v29, v31) and equal_sort[a37](v30, v32) equal_sort[a37](cons(v29, v30), nil) -> false equal_sort[a37](nil, cons(v33, v34)) -> false equal_sort[a37](nil, nil) -> true equal_sort[a48](true_renamed, true_renamed) -> true equal_sort[a48](true_renamed, false_renamed) -> false equal_sort[a48](false_renamed, true_renamed) -> false equal_sort[a48](false_renamed, false_renamed) -> true equal_sort[a63](witness_sort[a63], witness_sort[a63]) -> true if2'(true_renamed, n3, x9, xs5) -> true if2'(false_renamed, n4, x10, cons(x8, xs4)) -> if2'(ge(x8, n4), n4, x8, xs4) if2'(false_renamed, n4, x10, nil) -> false filterhigh'(n5, nil) -> false equal_sort[a48](ge(x8, n2), true_renamed) -> true | filterhigh'(n2, cons(x8, xs4)) -> true equal_sort[a48](ge(x8, n2), true_renamed) -> false | filterhigh'(n2, cons(x8, xs4)) -> filterhigh'(n2, xs4) last(cons(x'', nil)) -> x'' last(cons(x1, cons(y, xs''))) -> last(cons(y, xs'')) last(nil) -> 0 ge(x4, 0) -> true_renamed ge(0, s(x5)) -> false_renamed ge(s(x6), s(y')) -> ge(x6, y') filterlow(n1, nil) -> nil equal_sort[a48](ge(n, x2), true_renamed) -> true | filterlow(n, cons(x2, xs1)) -> filterlow(n, xs1) equal_sort[a48](ge(n, x2), true_renamed) -> false | filterlow(n, cons(x2, xs1)) -> cons(x2, filterlow(n, xs1)) filterhigh(n5, nil) -> nil equal_sort[a48](ge(x8, n2), true_renamed) -> true | filterhigh(n2, cons(x8, xs4)) -> filterhigh(n2, xs4) equal_sort[a48](ge(x8, n2), true_renamed) -> false | filterhigh(n2, cons(x8, xs4)) -> cons(x8, filterhigh(n2, xs4)) if1(true_renamed, n', x3, cons(x2, xs1)) -> if1(ge(n', x2), n', x2, xs1) if1(true_renamed, n', x3, nil) -> nil if1(false_renamed, n'', x7, cons(x2, xs1)) -> cons(x7, if1(ge(n'', x2), n'', x2, xs1)) if1(false_renamed, n'', x7, nil) -> cons(x7, nil) if2(true_renamed, n3, x9, cons(x8, xs4)) -> if2(ge(x8, n3), n3, x8, xs4) if2(true_renamed, n3, x9, nil) -> nil if2(false_renamed, n4, x10, cons(x8, xs4)) -> cons(x10, if2(ge(x8, n4), n4, x8, xs4)) if2(false_renamed, n4, x10, nil) -> cons(x10, nil) using the following formula: z0:sort[a37].(~(z0=nil)->filterhigh'(last(z0), z0)=true) could be successfully shown: (0) Formula (1) Induction by algorithm [EQUIVALENT, 0 ms] (2) AND (3) Formula (4) Symbolic evaluation [EQUIVALENT, 0 ms] (5) Formula (6) Induction by data structure [EQUIVALENT, 0 ms] (7) AND (8) Formula (9) Symbolic evaluation [EQUIVALENT, 0 ms] (10) YES (11) Formula (12) Conditional Evaluation [EQUIVALENT, 0 ms] (13) AND (14) Formula (15) Symbolic evaluation [EQUIVALENT, 0 ms] (16) YES (17) Formula (18) Symbolic evaluation [EQUIVALENT, 0 ms] (19) Formula (20) Hypothesis Lifting [EQUIVALENT, 0 ms] (21) Formula (22) Symbolic evaluation under hypothesis [SOUND, 0 ms] (23) Formula (24) Hypothesis Lifting [EQUIVALENT, 0 ms] (25) Formula (26) Hypothesis Lifting [EQUIVALENT, 0 ms] (27) Formula (28) Conditional Evaluation [EQUIVALENT, 0 ms] (29) AND (30) Formula (31) Symbolic evaluation under hypothesis [EQUIVALENT, 0 ms] (32) YES (33) Formula (34) Symbolic evaluation [EQUIVALENT, 0 ms] (35) YES (36) Formula (37) Symbolic evaluation [EQUIVALENT, 0 ms] (38) YES (39) Formula (40) Symbolic evaluation [EQUIVALENT, 0 ms] (41) Formula (42) Conditional Evaluation [EQUIVALENT, 0 ms] (43) AND (44) Formula (45) Symbolic evaluation [EQUIVALENT, 0 ms] (46) YES (47) Formula (48) Symbolic evaluation under hypothesis [EQUIVALENT, 0 ms] (49) YES ---------------------------------------- (0) Obligation: Formula: z0:sort[a37].(~(z0=nil)->filterhigh'(last(z0), z0)=true) There are no hypotheses. ---------------------------------------- (1) Induction by algorithm (EQUIVALENT) Induction by algorithm last(z0) generates the following cases: 1. Base Case: Formula: x'':sort[a0].(~(cons(x'', nil)=nil)->filterhigh'(last(cons(x'', nil)), cons(x'', nil))=true) There are no hypotheses. 2. Base Case: Formula: (~(nil=nil)->filterhigh'(last(nil), nil)=true) There are no hypotheses. 1. Step Case: Formula: x1:sort[a0],y:sort[a0],xs'':sort[a37].(~(cons(x1, cons(y, xs''))=nil)->filterhigh'(last(cons(x1, cons(y, xs''))), cons(x1, cons(y, xs'')))=true) Hypotheses: y:sort[a0],xs'':sort[a37].filterhigh'(last(cons(y, xs'')), cons(y, xs''))=true ---------------------------------------- (2) Complex Obligation (AND) ---------------------------------------- (3) Obligation: Formula: x'':sort[a0].(~(cons(x'', nil)=nil)->filterhigh'(last(cons(x'', nil)), cons(x'', nil))=true) There are no hypotheses. ---------------------------------------- (4) Symbolic evaluation (EQUIVALENT) Could be shown by simple symbolic evaluation. ---------------------------------------- (5) Obligation: Formula: x'':sort[a0].filterhigh'(x'', cons(x'', nil))=true There are no hypotheses. ---------------------------------------- (6) Induction by data structure (EQUIVALENT) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: filterhigh'(0, cons(0, nil))=true There are no hypotheses. 1. Step Case: Formula: n:sort[a0].filterhigh'(s(n), cons(s(n), nil))=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true ---------------------------------------- (7) Complex Obligation (AND) ---------------------------------------- (8) Obligation: Formula: filterhigh'(0, cons(0, nil))=true There are no hypotheses. ---------------------------------------- (9) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (10) YES ---------------------------------------- (11) Obligation: Formula: n:sort[a0].filterhigh'(s(n), cons(s(n), nil))=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true ---------------------------------------- (12) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: true=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_sort[a48](ge(s(n), s(n)), true_renamed)=true Formula: n:sort[a0].filterhigh'(s(n), nil)=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_sort[a48](ge(s(n), s(n)), true_renamed)=false ---------------------------------------- (13) Complex Obligation (AND) ---------------------------------------- (14) Obligation: Formula: true=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_sort[a48](ge(s(n), s(n)), true_renamed)=true ---------------------------------------- (15) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (16) YES ---------------------------------------- (17) Obligation: Formula: n:sort[a0].filterhigh'(s(n), nil)=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_sort[a48](ge(s(n), s(n)), true_renamed)=false ---------------------------------------- (18) Symbolic evaluation (EQUIVALENT) Could be shown by simple symbolic evaluation. ---------------------------------------- (19) Obligation: Formula: False Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_sort[a48](ge(s(n), s(n)), true_renamed)=false ---------------------------------------- (20) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].((filterhigh'(n, cons(n, nil))=true/\equal_sort[a48](ge(s(n), s(n)), true_renamed)=false)->False) Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_sort[a48](ge(s(n), s(n)), true_renamed)=false ---------------------------------------- (21) Obligation: Formula: n:sort[a0].((filterhigh'(n, cons(n, nil))=true/\equal_sort[a48](ge(s(n), s(n)), true_renamed)=false)->False) Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_sort[a48](ge(s(n), s(n)), true_renamed)=false ---------------------------------------- (22) Symbolic evaluation under hypothesis (SOUND) Could be reduced by symbolic evaluation under hypothesis to: n:sort[a0].~(equal_sort[a48](ge(n, n), true_renamed)=false) By using the following hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true ---------------------------------------- (23) Obligation: Formula: n:sort[a0].~(equal_sort[a48](ge(n, n), true_renamed)=false) Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_sort[a48](ge(s(n), s(n)), true_renamed)=false ---------------------------------------- (24) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].(equal_sort[a48](ge(n, n), true_renamed)=false->~(equal_sort[a48](ge(n, n), true_renamed)=false)) Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true ---------------------------------------- (25) Obligation: Formula: n:sort[a0].(equal_sort[a48](ge(n, n), true_renamed)=false->~(equal_sort[a48](ge(n, n), true_renamed)=false)) Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true ---------------------------------------- (26) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].(filterhigh'(n, cons(n, nil))=true->(equal_sort[a48](ge(n, n), true_renamed)=false->~(equal_sort[a48](ge(n, n), true_renamed)=false))) There are no hypotheses. ---------------------------------------- (27) Obligation: Formula: n:sort[a0].(filterhigh'(n, cons(n, nil))=true->(equal_sort[a48](ge(n, n), true_renamed)=false->~(equal_sort[a48](ge(n, n), true_renamed)=false))) There are no hypotheses. ---------------------------------------- (28) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: n:sort[a0].(true=true->(equal_sort[a48](ge(n, n), true_renamed)=false->~(equal_sort[a48](ge(n, n), true_renamed)=false))) Hypotheses: n:sort[a0].equal_sort[a48](ge(n, n), true_renamed)=true Formula: n:sort[a0].(filterhigh'(n, nil)=true->(equal_sort[a48](ge(n, n), true_renamed)=false->~(equal_sort[a48](ge(n, n), true_renamed)=false))) Hypotheses: n:sort[a0].equal_sort[a48](ge(n, n), true_renamed)=false ---------------------------------------- (29) Complex Obligation (AND) ---------------------------------------- (30) Obligation: Formula: n:sort[a0].(true=true->(equal_sort[a48](ge(n, n), true_renamed)=false->~(equal_sort[a48](ge(n, n), true_renamed)=false))) Hypotheses: n:sort[a0].equal_sort[a48](ge(n, n), true_renamed)=true ---------------------------------------- (31) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n:sort[a0].equal_sort[a48](ge(n, n), true_renamed)=true ---------------------------------------- (32) YES ---------------------------------------- (33) Obligation: Formula: n:sort[a0].(filterhigh'(n, nil)=true->(equal_sort[a48](ge(n, n), true_renamed)=false->~(equal_sort[a48](ge(n, n), true_renamed)=false))) Hypotheses: n:sort[a0].equal_sort[a48](ge(n, n), true_renamed)=false ---------------------------------------- (34) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (35) YES ---------------------------------------- (36) Obligation: Formula: (~(nil=nil)->filterhigh'(last(nil), nil)=true) There are no hypotheses. ---------------------------------------- (37) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (38) YES ---------------------------------------- (39) Obligation: Formula: x1:sort[a0],y:sort[a0],xs'':sort[a37].(~(cons(x1, cons(y, xs''))=nil)->filterhigh'(last(cons(x1, cons(y, xs''))), cons(x1, cons(y, xs'')))=true) Hypotheses: y:sort[a0],xs'':sort[a37].filterhigh'(last(cons(y, xs'')), cons(y, xs''))=true ---------------------------------------- (40) Symbolic evaluation (EQUIVALENT) Could be shown by simple symbolic evaluation. ---------------------------------------- (41) Obligation: Formula: y:sort[a0],xs'':sort[a37],x1:sort[a0].filterhigh'(last(cons(y, xs'')), cons(x1, cons(y, xs'')))=true Hypotheses: y:sort[a0],xs'':sort[a37].filterhigh'(last(cons(y, xs'')), cons(y, xs''))=true ---------------------------------------- (42) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: true=true Hypotheses: y:sort[a0],xs'':sort[a37].filterhigh'(last(cons(y, xs'')), cons(y, xs''))=true x1:sort[a0],y:sort[a0],xs'':sort[a37].equal_sort[a48](ge(x1, last(cons(y, xs''))), true_renamed)=true Formula: y:sort[a0],xs'':sort[a37].filterhigh'(last(cons(y, xs'')), cons(y, xs''))=true Hypotheses: y:sort[a0],xs'':sort[a37].filterhigh'(last(cons(y, xs'')), cons(y, xs''))=true x1:sort[a0],y:sort[a0],xs'':sort[a37].equal_sort[a48](ge(x1, last(cons(y, xs''))), true_renamed)=false ---------------------------------------- (43) Complex Obligation (AND) ---------------------------------------- (44) Obligation: Formula: true=true Hypotheses: y:sort[a0],xs'':sort[a37].filterhigh'(last(cons(y, xs'')), cons(y, xs''))=true x1:sort[a0],y:sort[a0],xs'':sort[a37].equal_sort[a48](ge(x1, last(cons(y, xs''))), true_renamed)=true ---------------------------------------- (45) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (46) YES ---------------------------------------- (47) Obligation: Formula: y:sort[a0],xs'':sort[a37].filterhigh'(last(cons(y, xs'')), cons(y, xs''))=true Hypotheses: y:sort[a0],xs'':sort[a37].filterhigh'(last(cons(y, xs'')), cons(y, xs''))=true x1:sort[a0],y:sort[a0],xs'':sort[a37].equal_sort[a48](ge(x1, last(cons(y, xs''))), true_renamed)=false ---------------------------------------- (48) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: y:sort[a0],xs'':sort[a37].filterhigh'(last(cons(y, xs'')), cons(y, xs''))=true ---------------------------------------- (49) YES ---------------------------------------- (48) Complex Obligation (AND) ---------------------------------------- (49) Obligation: Q DP problem: The TRS P consists of the following rules: QSORT(cons(x, xs)) -> QSORT(filterlow(last(cons(x, xs)), cons(x, xs))) The TRS R consists of the following rules: last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) if1(true, n, x, xs) -> filterlow(n, xs) ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) filterlow(n, nil) -> nil filterhigh(n, cons(x, xs)) -> if2(ge(x, n), n, x, xs) if2(true, n, x, xs) -> filterhigh(n, xs) if2(false, n, x, xs) -> cons(x, filterhigh(n, xs)) filterhigh(n, nil) -> nil The set Q consists of the following terms: filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (50) 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. ---------------------------------------- (51) Obligation: Q DP problem: The TRS P consists of the following rules: QSORT(cons(x, xs)) -> QSORT(filterlow(last(cons(x, xs)), cons(x, xs))) The TRS R consists of the following rules: last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) if1(true, n, x, xs) -> filterlow(n, xs) filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) filterlow(n, nil) -> nil ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) The set Q consists of the following terms: filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (52) 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]. filterhigh(x0, nil) filterhigh(x0, cons(x1, x2)) if2(true, x0, x1, x2) if2(false, x0, x1, x2) ---------------------------------------- (53) Obligation: Q DP problem: The TRS P consists of the following rules: QSORT(cons(x, xs)) -> QSORT(filterlow(last(cons(x, xs)), cons(x, xs))) The TRS R consists of the following rules: last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) if1(true, n, x, xs) -> filterlow(n, xs) filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) filterlow(n, nil) -> nil ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) The set Q consists of the following terms: filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (54) Induction-Processor (SOUND) This DP could be deleted by the Induction-Processor: QSORT(cons(x, xs)) -> QSORT(filterlow(last(cons(x, xs)), cons(x, xs))) This order was computed: Polynomial interpretation [POLO]: POL(0) = 0 POL(QSORT(x_1)) = x_1 POL(cons(x_1, x_2)) = 1 + x_1 + 2*x_2 POL(false_renamed) = 0 POL(filterlow(x_1, x_2)) = x_2 POL(ge(x_1, x_2)) = 0 POL(if1(x_1, x_2, x_3, x_4)) = 1 + x_3 + 2*x_4 POL(last(x_1)) = x_1 POL(nil) = 0 POL(s(x_1)) = 2 + 3*x_1 POL(true_renamed) = 0 At least one of these decreasing rules is always used after the deleted DP: if1(true_renamed, n1, x6, xs2) -> filterlow(n1, xs2) The following formula is valid: z0:sort[a25].(~(z0=nil)->filterlow'(last(z0), z0)=true) The transformed set: filterlow'(n, cons(x1, xs'')) -> if1'(ge(n, x1), n, x1, xs'') filterlow'(n', nil) -> false if1'(false_renamed, n'', x5, xs1) -> filterlow'(n'', xs1) if1'(true_renamed, n1, x6, xs2) -> true last(cons(x', nil)) -> x' last(cons(x'', cons(y, xs'))) -> last(cons(y, xs')) filterlow(n, cons(x1, xs'')) -> if1(ge(n, x1), n, x1, xs'') filterlow(n', nil) -> nil ge(x2, 0) -> true_renamed ge(0, s(x3)) -> false_renamed ge(s(x4), s(y')) -> ge(x4, y') if1(false_renamed, n'', x5, xs1) -> cons(x5, filterlow(n'', xs1)) if1(true_renamed, n1, x6, xs2) -> filterlow(n1, xs2) last(nil) -> 0 equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v18)) -> false equal_sort[a0](s(v19), 0) -> false equal_sort[a0](s(v19), s(v20)) -> equal_sort[a0](v19, v20) equal_sort[a25](cons(v21, v22), cons(v23, v24)) -> and(equal_sort[a0](v21, v23), equal_sort[a25](v22, v24)) equal_sort[a25](cons(v21, v22), nil) -> false equal_sort[a25](nil, cons(v25, v26)) -> false equal_sort[a25](nil, nil) -> true equal_sort[a36](true_renamed, true_renamed) -> true equal_sort[a36](true_renamed, false_renamed) -> false equal_sort[a36](false_renamed, true_renamed) -> false equal_sort[a36](false_renamed, false_renamed) -> true equal_sort[a43](witness_sort[a43], witness_sort[a43]) -> true The proof given by the theorem prover: The following output was given by the internal theorem prover:proof of internal # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Partial correctness of the following Program [x, v18, v19, v20, v21, v22, v23, v24, v25, v26, n', n, x1, xs'', n1, x6, xs2, n'', x5, x', x'', y, xs', x2, x3, x4, y'] equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true true and x -> x false and x -> false true or x -> true false or x -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v18)) -> false equal_sort[a0](s(v19), 0) -> false equal_sort[a0](s(v19), s(v20)) -> equal_sort[a0](v19, v20) equal_sort[a25](cons(v21, v22), cons(v23, v24)) -> equal_sort[a0](v21, v23) and equal_sort[a25](v22, v24) equal_sort[a25](cons(v21, v22), nil) -> false equal_sort[a25](nil, cons(v25, v26)) -> false equal_sort[a25](nil, nil) -> true equal_sort[a36](true_renamed, true_renamed) -> true equal_sort[a36](true_renamed, false_renamed) -> false equal_sort[a36](false_renamed, true_renamed) -> false equal_sort[a36](false_renamed, false_renamed) -> true equal_sort[a43](witness_sort[a43], witness_sort[a43]) -> true filterlow'(n', nil) -> false equal_sort[a36](ge(n, x1), false_renamed) -> true | filterlow'(n, cons(x1, xs'')) -> filterlow'(n, xs'') equal_sort[a36](ge(n, x1), false_renamed) -> false | filterlow'(n, cons(x1, xs'')) -> true if1'(true_renamed, n1, x6, xs2) -> true if1'(false_renamed, n'', x5, cons(x1, xs'')) -> if1'(ge(n'', x1), n'', x1, xs'') if1'(false_renamed, n'', x5, nil) -> false last(cons(x', nil)) -> x' last(cons(x'', cons(y, xs'))) -> last(cons(y, xs')) last(nil) -> 0 filterlow(n', nil) -> nil equal_sort[a36](ge(n, x1), false_renamed) -> true | filterlow(n, cons(x1, xs'')) -> cons(x1, filterlow(n, xs'')) equal_sort[a36](ge(n, x1), false_renamed) -> false | filterlow(n, cons(x1, xs'')) -> filterlow(n, xs'') ge(x2, 0) -> true_renamed ge(0, s(x3)) -> false_renamed ge(s(x4), s(y')) -> ge(x4, y') if1(false_renamed, n'', x5, cons(x1, xs'')) -> cons(x5, if1(ge(n'', x1), n'', x1, xs'')) if1(false_renamed, n'', x5, nil) -> cons(x5, nil) if1(true_renamed, n1, x6, cons(x1, xs'')) -> if1(ge(n1, x1), n1, x1, xs'') if1(true_renamed, n1, x6, nil) -> nil using the following formula: z0:sort[a25].(~(z0=nil)->filterlow'(last(z0), z0)=true) could be successfully shown: (0) Formula (1) Induction by algorithm [EQUIVALENT, 0 ms] (2) AND (3) Formula (4) Symbolic evaluation [EQUIVALENT, 0 ms] (5) Formula (6) Induction by data structure [EQUIVALENT, 0 ms] (7) AND (8) Formula (9) Symbolic evaluation [EQUIVALENT, 0 ms] (10) YES (11) Formula (12) Conditional Evaluation [EQUIVALENT, 0 ms] (13) AND (14) Formula (15) Symbolic evaluation [EQUIVALENT, 0 ms] (16) Formula (17) Hypothesis Lifting [EQUIVALENT, 0 ms] (18) Formula (19) Symbolic evaluation under hypothesis [SOUND, 0 ms] (20) Formula (21) Hypothesis Lifting [EQUIVALENT, 0 ms] (22) Formula (23) Hypothesis Lifting [EQUIVALENT, 0 ms] (24) Formula (25) Conditional Evaluation [EQUIVALENT, 0 ms] (26) AND (27) Formula (28) Symbolic evaluation [EQUIVALENT, 0 ms] (29) YES (30) Formula (31) Symbolic evaluation under hypothesis [EQUIVALENT, 0 ms] (32) YES (33) Formula (34) Symbolic evaluation [EQUIVALENT, 0 ms] (35) YES (36) Formula (37) Symbolic evaluation [EQUIVALENT, 0 ms] (38) YES (39) Formula (40) Symbolic evaluation [EQUIVALENT, 0 ms] (41) Formula (42) Conditional Evaluation [EQUIVALENT, 0 ms] (43) AND (44) Formula (45) Symbolic evaluation under hypothesis [EQUIVALENT, 0 ms] (46) YES (47) Formula (48) Symbolic evaluation [EQUIVALENT, 0 ms] (49) YES ---------------------------------------- (0) Obligation: Formula: z0:sort[a25].(~(z0=nil)->filterlow'(last(z0), z0)=true) There are no hypotheses. ---------------------------------------- (1) Induction by algorithm (EQUIVALENT) Induction by algorithm last(z0) generates the following cases: 1. Base Case: Formula: x':sort[a0].(~(cons(x', nil)=nil)->filterlow'(last(cons(x', nil)), cons(x', nil))=true) There are no hypotheses. 2. Base Case: Formula: (~(nil=nil)->filterlow'(last(nil), nil)=true) There are no hypotheses. 1. Step Case: Formula: x'':sort[a0],y:sort[a0],xs':sort[a25].(~(cons(x'', cons(y, xs'))=nil)->filterlow'(last(cons(x'', cons(y, xs'))), cons(x'', cons(y, xs')))=true) Hypotheses: y:sort[a0],xs':sort[a25].filterlow'(last(cons(y, xs')), cons(y, xs'))=true ---------------------------------------- (2) Complex Obligation (AND) ---------------------------------------- (3) Obligation: Formula: x':sort[a0].(~(cons(x', nil)=nil)->filterlow'(last(cons(x', nil)), cons(x', nil))=true) There are no hypotheses. ---------------------------------------- (4) Symbolic evaluation (EQUIVALENT) Could be shown by simple symbolic evaluation. ---------------------------------------- (5) Obligation: Formula: x':sort[a0].filterlow'(x', cons(x', nil))=true There are no hypotheses. ---------------------------------------- (6) Induction by data structure (EQUIVALENT) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: filterlow'(0, cons(0, nil))=true There are no hypotheses. 1. Step Case: Formula: n:sort[a0].filterlow'(s(n), cons(s(n), nil))=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true ---------------------------------------- (7) Complex Obligation (AND) ---------------------------------------- (8) Obligation: Formula: filterlow'(0, cons(0, nil))=true There are no hypotheses. ---------------------------------------- (9) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (10) YES ---------------------------------------- (11) Obligation: Formula: n:sort[a0].filterlow'(s(n), cons(s(n), nil))=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true ---------------------------------------- (12) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: n:sort[a0].filterlow'(s(n), nil)=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](ge(s(n), s(n)), false_renamed)=true Formula: true=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](ge(s(n), s(n)), false_renamed)=false ---------------------------------------- (13) Complex Obligation (AND) ---------------------------------------- (14) Obligation: Formula: n:sort[a0].filterlow'(s(n), nil)=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](ge(s(n), s(n)), false_renamed)=true ---------------------------------------- (15) Symbolic evaluation (EQUIVALENT) Could be shown by simple symbolic evaluation. ---------------------------------------- (16) Obligation: Formula: False Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](ge(s(n), s(n)), false_renamed)=true ---------------------------------------- (17) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].((filterlow'(n, cons(n, nil))=true/\equal_sort[a36](ge(s(n), s(n)), false_renamed)=true)->False) Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](ge(s(n), s(n)), false_renamed)=true ---------------------------------------- (18) Obligation: Formula: n:sort[a0].((filterlow'(n, cons(n, nil))=true/\equal_sort[a36](ge(s(n), s(n)), false_renamed)=true)->False) Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](ge(s(n), s(n)), false_renamed)=true ---------------------------------------- (19) Symbolic evaluation under hypothesis (SOUND) Could be reduced by symbolic evaluation under hypothesis to: n:sort[a0].~(equal_sort[a36](ge(n, n), false_renamed)=true) By using the following hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true ---------------------------------------- (20) Obligation: Formula: n:sort[a0].~(equal_sort[a36](ge(n, n), false_renamed)=true) Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](ge(s(n), s(n)), false_renamed)=true ---------------------------------------- (21) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].(equal_sort[a36](ge(n, n), false_renamed)=true->~(equal_sort[a36](ge(n, n), false_renamed)=true)) Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true ---------------------------------------- (22) Obligation: Formula: n:sort[a0].(equal_sort[a36](ge(n, n), false_renamed)=true->~(equal_sort[a36](ge(n, n), false_renamed)=true)) Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true ---------------------------------------- (23) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].(filterlow'(n, cons(n, nil))=true->(equal_sort[a36](ge(n, n), false_renamed)=true->~(equal_sort[a36](ge(n, n), false_renamed)=true))) There are no hypotheses. ---------------------------------------- (24) Obligation: Formula: n:sort[a0].(filterlow'(n, cons(n, nil))=true->(equal_sort[a36](ge(n, n), false_renamed)=true->~(equal_sort[a36](ge(n, n), false_renamed)=true))) There are no hypotheses. ---------------------------------------- (25) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: n:sort[a0].(filterlow'(n, nil)=true->(equal_sort[a36](ge(n, n), false_renamed)=true->~(equal_sort[a36](ge(n, n), false_renamed)=true))) Hypotheses: n:sort[a0].equal_sort[a36](ge(n, n), false_renamed)=true Formula: n:sort[a0].(true=true->(equal_sort[a36](ge(n, n), false_renamed)=true->~(equal_sort[a36](ge(n, n), false_renamed)=true))) Hypotheses: n:sort[a0].equal_sort[a36](ge(n, n), false_renamed)=false ---------------------------------------- (26) Complex Obligation (AND) ---------------------------------------- (27) Obligation: Formula: n:sort[a0].(filterlow'(n, nil)=true->(equal_sort[a36](ge(n, n), false_renamed)=true->~(equal_sort[a36](ge(n, n), false_renamed)=true))) Hypotheses: n:sort[a0].equal_sort[a36](ge(n, n), false_renamed)=true ---------------------------------------- (28) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (29) YES ---------------------------------------- (30) Obligation: Formula: n:sort[a0].(true=true->(equal_sort[a36](ge(n, n), false_renamed)=true->~(equal_sort[a36](ge(n, n), false_renamed)=true))) Hypotheses: n:sort[a0].equal_sort[a36](ge(n, n), false_renamed)=false ---------------------------------------- (31) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n:sort[a0].equal_sort[a36](ge(n, n), false_renamed)=false ---------------------------------------- (32) YES ---------------------------------------- (33) Obligation: Formula: true=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_sort[a36](ge(s(n), s(n)), false_renamed)=false ---------------------------------------- (34) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (35) YES ---------------------------------------- (36) Obligation: Formula: (~(nil=nil)->filterlow'(last(nil), nil)=true) There are no hypotheses. ---------------------------------------- (37) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (38) YES ---------------------------------------- (39) Obligation: Formula: x'':sort[a0],y:sort[a0],xs':sort[a25].(~(cons(x'', cons(y, xs'))=nil)->filterlow'(last(cons(x'', cons(y, xs'))), cons(x'', cons(y, xs')))=true) Hypotheses: y:sort[a0],xs':sort[a25].filterlow'(last(cons(y, xs')), cons(y, xs'))=true ---------------------------------------- (40) Symbolic evaluation (EQUIVALENT) Could be shown by simple symbolic evaluation. ---------------------------------------- (41) Obligation: Formula: y:sort[a0],xs':sort[a25],x'':sort[a0].filterlow'(last(cons(y, xs')), cons(x'', cons(y, xs')))=true Hypotheses: y:sort[a0],xs':sort[a25].filterlow'(last(cons(y, xs')), cons(y, xs'))=true ---------------------------------------- (42) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: y:sort[a0],xs':sort[a25].filterlow'(last(cons(y, xs')), cons(y, xs'))=true Hypotheses: y:sort[a0],xs':sort[a25].filterlow'(last(cons(y, xs')), cons(y, xs'))=true y:sort[a0],xs':sort[a25],x'':sort[a0].equal_sort[a36](ge(last(cons(y, xs')), x''), false_renamed)=true Formula: true=true Hypotheses: y:sort[a0],xs':sort[a25].filterlow'(last(cons(y, xs')), cons(y, xs'))=true y:sort[a0],xs':sort[a25],x'':sort[a0].equal_sort[a36](ge(last(cons(y, xs')), x''), false_renamed)=false ---------------------------------------- (43) Complex Obligation (AND) ---------------------------------------- (44) Obligation: Formula: y:sort[a0],xs':sort[a25].filterlow'(last(cons(y, xs')), cons(y, xs'))=true Hypotheses: y:sort[a0],xs':sort[a25].filterlow'(last(cons(y, xs')), cons(y, xs'))=true y:sort[a0],xs':sort[a25],x'':sort[a0].equal_sort[a36](ge(last(cons(y, xs')), x''), false_renamed)=true ---------------------------------------- (45) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: y:sort[a0],xs':sort[a25].filterlow'(last(cons(y, xs')), cons(y, xs'))=true ---------------------------------------- (46) YES ---------------------------------------- (47) Obligation: Formula: true=true Hypotheses: y:sort[a0],xs':sort[a25].filterlow'(last(cons(y, xs')), cons(y, xs'))=true y:sort[a0],xs':sort[a25],x'':sort[a0].equal_sort[a36](ge(last(cons(y, xs')), x''), false_renamed)=false ---------------------------------------- (48) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (49) YES ---------------------------------------- (55) Complex Obligation (AND) ---------------------------------------- (56) Obligation: Q DP problem: P is empty. The TRS R consists of the following rules: last(cons(x, nil)) -> x last(cons(x, cons(y, xs))) -> last(cons(y, xs)) if1(true, n, x, xs) -> filterlow(n, xs) filterlow(n, cons(x, xs)) -> if1(ge(n, x), n, x, xs) filterlow(n, nil) -> nil ge(x, 0) -> true ge(0, s(x)) -> false ge(s(x), s(y)) -> ge(x, y) if1(false, n, x, xs) -> cons(x, filterlow(n, xs)) The set Q consists of the following terms: filterlow(x0, nil) filterlow(x0, cons(x1, x2)) if1(true, x0, x1, x2) if1(false, x0, x1, x2) ge(x0, 0) ge(0, s(x0)) ge(s(x0), s(x1)) last(nil) last(cons(x0, nil)) last(cons(x0, cons(x1, x2))) We have to consider all minimal (P,Q,R)-chains. ---------------------------------------- (57) PisEmptyProof (EQUIVALENT) The TRS P is empty. Hence, there is no (P,Q,R) chain. ---------------------------------------- (58) YES ---------------------------------------- (59) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: filterlow'(n, cons(x1, xs'')) -> if1'(ge(n, x1), n, x1, xs'') filterlow'(n', nil) -> false if1'(false_renamed, n'', x5, xs1) -> filterlow'(n'', xs1) if1'(true_renamed, n1, x6, xs2) -> true last(cons(x', nil)) -> x' last(cons(x'', cons(y, xs'))) -> last(cons(y, xs')) filterlow(n, cons(x1, xs'')) -> if1(ge(n, x1), n, x1, xs'') filterlow(n', nil) -> nil ge(x2, 0) -> true_renamed ge(0, s(x3)) -> false_renamed ge(s(x4), s(y')) -> ge(x4, y') if1(false_renamed, n'', x5, xs1) -> cons(x5, filterlow(n'', xs1)) if1(true_renamed, n1, x6, xs2) -> filterlow(n1, xs2) last(nil) -> 0 equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v18)) -> false equal_sort[a0](s(v19), 0) -> false equal_sort[a0](s(v19), s(v20)) -> equal_sort[a0](v19, v20) equal_sort[a25](cons(v21, v22), cons(v23, v24)) -> and(equal_sort[a0](v21, v23), equal_sort[a25](v22, v24)) equal_sort[a25](cons(v21, v22), nil) -> false equal_sort[a25](nil, cons(v25, v26)) -> false equal_sort[a25](nil, nil) -> true equal_sort[a36](true_renamed, true_renamed) -> true equal_sort[a36](true_renamed, false_renamed) -> false equal_sort[a36](false_renamed, true_renamed) -> false equal_sort[a36](false_renamed, false_renamed) -> true equal_sort[a43](witness_sort[a43], witness_sort[a43]) -> true Q is empty. ---------------------------------------- (60) QTRSRRRProof (EQUIVALENT) Used ordering: filterlow'/2(YES,YES) cons/2(YES,YES) if1'/4(YES,YES,YES,YES) ge/2(YES,YES) nil/0) false/0) false_renamed/0) true_renamed/0) true/0) last/1)YES( filterlow/2(YES,YES) if1/4(YES,YES,YES,YES) 0/0) s/1)YES( equal_bool/2(YES,YES) and/2(YES,YES) or/2(YES,YES) not/1(YES) isa_true/1(YES) isa_false/1(YES) equal_sort[a0]/2(YES,YES) equal_sort[a25]/2(YES,YES) equal_sort[a36]/2(YES,YES) equal_sort[a43]/2(YES,YES) witness_sort[a43]/0) Quasi precedence: [nil, false_renamed, true_renamed, filterlow_2, if1_4, 0] > [filterlow'_2, if1'_4] > ge_2 [nil, false_renamed, true_renamed, filterlow_2, if1_4, 0] > cons_2 > and_2 [nil, false_renamed, true_renamed, filterlow_2, if1_4, 0] > [true, equal_bool_2] > false or_2 > [true, equal_bool_2] > false not_1 > [true, equal_bool_2] > false isa_true_1 > [true, equal_bool_2] > false isa_false_1 > [true, equal_bool_2] > false [equal_sort[a0]_2, equal_sort[a25]_2] > [true, equal_bool_2] > false [equal_sort[a0]_2, equal_sort[a25]_2] > and_2 equal_sort[a36]_2 > [true, equal_bool_2] > false equal_sort[a43]_2 > [true, equal_bool_2] > false Status: filterlow'_2: [2,1] cons_2: multiset status if1'_4: [4,2,3,1] ge_2: multiset status nil: multiset status false: multiset status false_renamed: multiset status true_renamed: multiset status true: multiset status filterlow_2: [2,1] if1_4: [4,2,3,1] 0: multiset status equal_bool_2: [2,1] and_2: [1,2] or_2: [2,1] not_1: multiset status isa_true_1: [1] isa_false_1: [1] equal_sort[a0]_2: [1,2] equal_sort[a25]_2: [1,2] equal_sort[a36]_2: multiset status equal_sort[a43]_2: [1,2] witness_sort[a43]: multiset status With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: filterlow'(n, cons(x1, xs'')) -> if1'(ge(n, x1), n, x1, xs'') filterlow'(n', nil) -> false if1'(false_renamed, n'', x5, xs1) -> filterlow'(n'', xs1) if1'(true_renamed, n1, x6, xs2) -> true last(cons(x', nil)) -> x' last(cons(x'', cons(y, xs'))) -> last(cons(y, xs')) filterlow(n, cons(x1, xs'')) -> if1(ge(n, x1), n, x1, xs'') filterlow(n', nil) -> nil ge(x2, 0) -> true_renamed ge(0, s(x3)) -> false_renamed if1(false_renamed, n'', x5, xs1) -> cons(x5, filterlow(n'', xs1)) if1(true_renamed, n1, x6, xs2) -> filterlow(n1, xs2) equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v18)) -> false equal_sort[a0](s(v19), 0) -> false equal_sort[a25](cons(v21, v22), cons(v23, v24)) -> and(equal_sort[a0](v21, v23), equal_sort[a25](v22, v24)) equal_sort[a25](cons(v21, v22), nil) -> false equal_sort[a25](nil, cons(v25, v26)) -> false equal_sort[a25](nil, nil) -> true equal_sort[a36](true_renamed, true_renamed) -> true equal_sort[a36](true_renamed, false_renamed) -> false equal_sort[a36](false_renamed, true_renamed) -> false equal_sort[a36](false_renamed, false_renamed) -> true equal_sort[a43](witness_sort[a43], witness_sort[a43]) -> true ---------------------------------------- (61) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: ge(s(x4), s(y')) -> ge(x4, y') last(nil) -> 0 equal_sort[a0](s(v19), s(v20)) -> equal_sort[a0](v19, v20) Q is empty. ---------------------------------------- (62) QTRSRRRProof (EQUIVALENT) Used ordering: Polynomial interpretation [POLO]: POL(0) = 2 POL(equal_sort[a0](x_1, x_2)) = 2*x_1 + x_2 POL(ge(x_1, x_2)) = 2*x_1 + 2*x_2 POL(last(x_1)) = 1 + 2*x_1 POL(nil) = 1 POL(s(x_1)) = 2 + x_1 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: ge(s(x4), s(y')) -> ge(x4, y') last(nil) -> 0 equal_sort[a0](s(v19), s(v20)) -> equal_sort[a0](v19, v20) ---------------------------------------- (63) Obligation: Q restricted rewrite system: R is empty. Q is empty. ---------------------------------------- (64) RisEmptyProof (EQUIVALENT) The TRS R is empty. Hence, termination is trivially proven. ---------------------------------------- (65) YES ---------------------------------------- (66) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: filterhigh'(n2, cons(x8, xs4)) -> if2'(ge(x8, n2), n2, x8, xs4) if2'(true_renamed, n3, x9, xs5) -> true if2'(false_renamed, n4, x10, xs6) -> filterhigh'(n4, xs6) filterhigh'(n5, nil) -> false last(cons(x'', nil)) -> x'' last(cons(x1, cons(y, xs''))) -> last(cons(y, xs'')) filterlow(n, cons(x2, xs1)) -> if1(ge(n, x2), n, x2, xs1) if1(true_renamed, n', x3, xs2) -> filterlow(n', xs2) ge(x4, 0) -> true_renamed ge(0, s(x5)) -> false_renamed ge(s(x6), s(y')) -> ge(x6, y') if1(false_renamed, n'', x7, xs3) -> cons(x7, filterlow(n'', xs3)) filterlow(n1, nil) -> nil filterhigh(n2, cons(x8, xs4)) -> if2(ge(x8, n2), n2, x8, xs4) if2(true_renamed, n3, x9, xs5) -> filterhigh(n3, xs5) if2(false_renamed, n4, x10, xs6) -> cons(x10, filterhigh(n4, xs6)) filterhigh(n5, nil) -> nil last(nil) -> 0 equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_true(true) -> true isa_true(false) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v26)) -> false equal_sort[a0](s(v27), 0) -> false equal_sort[a0](s(v27), s(v28)) -> equal_sort[a0](v27, v28) equal_sort[a37](cons(v29, v30), cons(v31, v32)) -> and(equal_sort[a0](v29, v31), equal_sort[a37](v30, v32)) equal_sort[a37](cons(v29, v30), nil) -> false equal_sort[a37](nil, cons(v33, v34)) -> false equal_sort[a37](nil, nil) -> true equal_sort[a48](true_renamed, true_renamed) -> true equal_sort[a48](true_renamed, false_renamed) -> false equal_sort[a48](false_renamed, true_renamed) -> false equal_sort[a48](false_renamed, false_renamed) -> true equal_sort[a63](witness_sort[a63], witness_sort[a63]) -> true Q is empty. ---------------------------------------- (67) QTRSRRRProof (EQUIVALENT) Used ordering: filterhigh'/2(YES,YES) cons/2(YES,YES) if2'/4(YES,YES,YES,YES) ge/2(YES,YES) true_renamed/0) true/0) false_renamed/0) nil/0) false/0) last/1)YES( filterlow/2(YES,YES) if1/4(YES,YES,YES,YES) 0/0) s/1)YES( filterhigh/2(YES,YES) if2/4(YES,YES,YES,YES) equal_bool/2(YES,YES) and/2(YES,YES) or/2(YES,YES) not/1(YES) isa_true/1)YES( isa_false/1(YES) equal_sort[a0]/2(YES,YES) equal_sort[a37]/2(YES,YES) equal_sort[a48]/2(YES,YES) equal_sort[a63]/2(YES,YES) witness_sort[a63]/0) Quasi precedence: [filterhigh'_2, if2'_4] > [true, nil, equal_bool_2, equal_sort[a0]_2] > [ge_2, true_renamed, false_renamed, 0] > false [filterlow_2, if1_4] > cons_2 > [ge_2, true_renamed, false_renamed, 0] > false [filterlow_2, if1_4] > cons_2 > and_2 > false [filterlow_2, if1_4] > [true, nil, equal_bool_2, equal_sort[a0]_2] > [ge_2, true_renamed, false_renamed, 0] > false [filterhigh_2, if2_4] > cons_2 > [ge_2, true_renamed, false_renamed, 0] > false [filterhigh_2, if2_4] > cons_2 > and_2 > false [filterhigh_2, if2_4] > [true, nil, equal_bool_2, equal_sort[a0]_2] > [ge_2, true_renamed, false_renamed, 0] > false or_2 > [true, nil, equal_bool_2, equal_sort[a0]_2] > [ge_2, true_renamed, false_renamed, 0] > false not_1 > [true, nil, equal_bool_2, equal_sort[a0]_2] > [ge_2, true_renamed, false_renamed, 0] > false isa_false_1 > [true, nil, equal_bool_2, equal_sort[a0]_2] > [ge_2, true_renamed, false_renamed, 0] > false equal_sort[a37]_2 > [true, nil, equal_bool_2, equal_sort[a0]_2] > [ge_2, true_renamed, false_renamed, 0] > false equal_sort[a37]_2 > and_2 > false equal_sort[a48]_2 > [true, nil, equal_bool_2, equal_sort[a0]_2] > [ge_2, true_renamed, false_renamed, 0] > false equal_sort[a63]_2 > [true, nil, equal_bool_2, equal_sort[a0]_2] > [ge_2, true_renamed, false_renamed, 0] > false witness_sort[a63] > [true, nil, equal_bool_2, equal_sort[a0]_2] > [ge_2, true_renamed, false_renamed, 0] > false Status: filterhigh'_2: [2,1] cons_2: multiset status if2'_4: [4,2,3,1] ge_2: multiset status true_renamed: multiset status true: multiset status false_renamed: multiset status nil: multiset status false: multiset status filterlow_2: [2,1] if1_4: [4,2,3,1] 0: multiset status filterhigh_2: [2,1] if2_4: [4,2,1,3] equal_bool_2: [1,2] and_2: [2,1] or_2: [2,1] not_1: [1] isa_false_1: multiset status equal_sort[a0]_2: [1,2] equal_sort[a37]_2: [1,2] equal_sort[a48]_2: [1,2] equal_sort[a63]_2: [2,1] witness_sort[a63]: multiset status With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: filterhigh'(n2, cons(x8, xs4)) -> if2'(ge(x8, n2), n2, x8, xs4) if2'(true_renamed, n3, x9, xs5) -> true if2'(false_renamed, n4, x10, xs6) -> filterhigh'(n4, xs6) filterhigh'(n5, nil) -> false last(cons(x'', nil)) -> x'' last(cons(x1, cons(y, xs''))) -> last(cons(y, xs'')) filterlow(n, cons(x2, xs1)) -> if1(ge(n, x2), n, x2, xs1) if1(true_renamed, n', x3, xs2) -> filterlow(n', xs2) ge(x4, 0) -> true_renamed ge(0, s(x5)) -> false_renamed if1(false_renamed, n'', x7, xs3) -> cons(x7, filterlow(n'', xs3)) filterlow(n1, nil) -> nil filterhigh(n2, cons(x8, xs4)) -> if2(ge(x8, n2), n2, x8, xs4) if2(true_renamed, n3, x9, xs5) -> filterhigh(n3, xs5) if2(false_renamed, n4, x10, xs6) -> cons(x10, filterhigh(n4, xs6)) filterhigh(n5, nil) -> nil last(nil) -> 0 equal_bool(true, false) -> false equal_bool(false, true) -> false equal_bool(true, true) -> true equal_bool(false, false) -> true and(true, x) -> x and(false, x) -> false or(true, x) -> true or(false, x) -> x not(false) -> true not(true) -> false isa_false(true) -> false isa_false(false) -> true equal_sort[a0](0, 0) -> true equal_sort[a0](0, s(v26)) -> false equal_sort[a0](s(v27), 0) -> false equal_sort[a37](cons(v29, v30), cons(v31, v32)) -> and(equal_sort[a0](v29, v31), equal_sort[a37](v30, v32)) equal_sort[a37](cons(v29, v30), nil) -> false equal_sort[a37](nil, cons(v33, v34)) -> false equal_sort[a37](nil, nil) -> true equal_sort[a48](true_renamed, true_renamed) -> true equal_sort[a48](true_renamed, false_renamed) -> false equal_sort[a48](false_renamed, true_renamed) -> false equal_sort[a48](false_renamed, false_renamed) -> true equal_sort[a63](witness_sort[a63], witness_sort[a63]) -> true ---------------------------------------- (68) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: ge(s(x6), s(y')) -> ge(x6, y') isa_true(true) -> true isa_true(false) -> false equal_sort[a0](s(v27), s(v28)) -> equal_sort[a0](v27, v28) Q is empty. ---------------------------------------- (69) QTRSRRRProof (EQUIVALENT) Used ordering: Polynomial interpretation [POLO]: POL(equal_sort[a0](x_1, x_2)) = x_1 + x_2 POL(false) = 0 POL(ge(x_1, x_2)) = x_1 + x_2 POL(isa_true(x_1)) = 2*x_1 POL(s(x_1)) = 2 + 2*x_1 POL(true) = 0 With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: ge(s(x6), s(y')) -> ge(x6, y') equal_sort[a0](s(v27), s(v28)) -> equal_sort[a0](v27, v28) ---------------------------------------- (70) Obligation: Q restricted rewrite system: The TRS R consists of the following rules: isa_true(true) -> true isa_true(false) -> false Q is empty. ---------------------------------------- (71) QTRSRRRProof (EQUIVALENT) Used ordering: Knuth-Bendix order [KBO] with precedence:isa_true_1 > false > true and weight map: true=1 false=1 isa_true_1=0 The variable weight is 1With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly: isa_true(true) -> true isa_true(false) -> false ---------------------------------------- (72) Obligation: Q restricted rewrite system: R is empty. Q is empty. ---------------------------------------- (73) RisEmptyProof (EQUIVALENT) The TRS R is empty. Hence, termination is trivially proven. ---------------------------------------- (74) YES