0 QTRS
↳1 Overlay + Local Confluence (⇔)
↳2 QTRS
↳3 DependencyPairsProof (⇔)
↳4 QDP
↳5 DependencyGraphProof (⇔)
↳6 AND
↳7 QDP
↳8 UsableRulesProof (⇔)
↳9 QDP
↳10 QReductionProof (⇔)
↳11 QDP
↳12 QDPSizeChangeProof (⇔)
↳13 YES
↳14 QDP
↳15 UsableRulesProof (⇔)
↳16 QDP
↳17 QReductionProof (⇔)
↳18 QDP
↳19 QDPSizeChangeProof (⇔)
↳20 YES
↳21 QDP
↳22 UsableRulesProof (⇔)
↳23 QDP
↳24 QReductionProof (⇔)
↳25 QDP
↳26 QDPSizeChangeProof (⇔)
↳27 YES
↳28 QDP
↳29 UsableRulesProof (⇔)
↳30 QDP
↳31 QReductionProof (⇔)
↳32 QDP
↳33 QDPSizeChangeProof (⇔)
↳34 YES
↳35 QDP
↳36 UsableRulesProof (⇔)
↳37 QDP
↳38 QReductionProof (⇔)
↳39 QDP
↳40 QDPSizeChangeProof (⇔)
↳41 YES
↳42 QDP
↳43 UsableRulesProof (⇔)
↳44 QDP
↳45 QReductionProof (⇔)
↳46 QDP
↳47 QDPSizeChangeProof (⇔)
↳48 YES
↳49 QDP
↳50 UsableRulesProof (⇔)
↳51 QDP
↳52 QReductionProof (⇔)
↳53 QDP
↳54 QDPSizeChangeProof (⇔)
↳55 YES
↳56 QDP
↳57 UsableRulesProof (⇔)
↳58 QDP
↳59 QReductionProof (⇔)
↳60 QDP
↳61 Rewriting (⇔)
↳62 QDP
↳63 Rewriting (⇔)
↳64 QDP
↳65 Narrowing (⇔)
↳66 QDP
↳67 Rewriting (⇔)
↳68 QDP
↳69 Rewriting (⇔)
↳70 QDP
↳71 Rewriting (⇔)
↳72 QDP
↳73 Rewriting (⇔)
↳74 QDP
↳75 Rewriting (⇔)
↳76 QDP
↳77 Rewriting (⇔)
↳78 QDP
↳79 Rewriting (⇔)
↳80 QDP
↳81 Rewriting (⇔)
↳82 QDP
↳83 Narrowing (⇔)
↳84 QDP
↳85 Rewriting (⇔)
↳86 QDP
↳87 Rewriting (⇔)
↳88 QDP
↳89 Rewriting (⇔)
↳90 QDP
↳91 Rewriting (⇔)
↳92 QDP
↳93 Rewriting (⇔)
↳94 QDP
↳95 Rewriting (⇔)
↳96 QDP
↳97 Rewriting (⇔)
↳98 QDP
↳99 Rewriting (⇔)
↳100 QDP
↳101 Rewriting (⇔)
↳102 QDP
↳103 QDPOrderProof (⇔)
↳104 QDP
↳105 QDPOrderProof (⇔)
↳106 QDP
↳107 UsableRulesProof (⇔)
↳108 QDP
↳109 QReductionProof (⇔)
↳110 QDP
↳111 Induction-Processor (⇐)
↳112 AND
↳113 QDP
↳114 Induction-Processor (⇐)
↳115 AND
↳116 QDP
↳117 Induction-Processor (⇐)
↳118 AND
↳119 QDP
↳120 UsableRulesProof (⇔)
↳121 QDP
↳122 QReductionProof (⇔)
↳123 QDP
↳124 Induction-Processor (⇐)
↳125 AND
↳126 QDP
↳127 PisEmptyProof (⇔)
↳128 YES
↳129 QTRS
↳130 QTRSRRRProof (⇔)
↳131 QTRS
↳132 RisEmptyProof (⇔)
↳133 YES
↳134 QTRS
↳135 QTRSRRRProof (⇔)
↳136 QTRS
↳137 QTRSRRRProof (⇔)
↳138 QTRS
↳139 RisEmptyProof (⇔)
↳140 YES
↳141 QTRS
↳142 QTRSRRRProof (⇔)
↳143 QTRS
↳144 QTRSRRRProof (⇔)
↳145 QTRS
↳146 RisEmptyProof (⇔)
↳147 YES
↳148 QTRS
↳149 QTRSRRRProof (⇔)
↳150 QTRS
↳151 QTRSRRRProof (⇔)
↳152 QTRS
↳153 RisEmptyProof (⇔)
↳154 YES
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, 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))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, 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))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QSORT(xs) → QS(half(length(xs)), xs)
QSORT(xs) → HALF(length(xs))
QSORT(xs) → LENGTH(xs)
QS(n, cons(x, xs)) → APPEND(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))))
QS(n, cons(x, xs)) → QS(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs)))
QS(n, cons(x, xs)) → HALF(n)
QS(n, cons(x, xs)) → FILTERLOW(get(n, cons(x, xs)), cons(x, xs))
QS(n, cons(x, xs)) → GET(n, cons(x, xs))
QS(n, cons(x, xs)) → QS(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))
QS(n, cons(x, xs)) → FILTERHIGH(get(n, 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)
LENGTH(cons(x, xs)) → LENGTH(xs)
HALF(s(s(x))) → HALF(x)
GET(s(n), cons(x, cons(y, xs))) → GET(n, cons(y, xs))
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, 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))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
GET(s(n), cons(x, cons(y, xs))) → GET(n, cons(y, xs))
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, 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))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
GET(s(n), cons(x, cons(y, xs))) → GET(n, cons(y, xs))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
GET(s(n), cons(x, cons(y, xs))) → GET(n, cons(y, xs))
From the DPs we obtained the following set of size-change graphs:
HALF(s(s(x))) → HALF(x)
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, 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))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
HALF(s(s(x))) → HALF(x)
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
HALF(s(s(x))) → HALF(x)
From the DPs we obtained the following set of size-change graphs:
LENGTH(cons(x, xs)) → LENGTH(xs)
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, 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))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
LENGTH(cons(x, xs)) → LENGTH(xs)
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
LENGTH(cons(x, xs)) → LENGTH(xs)
From the DPs we obtained the following set of size-change graphs:
APPEND(cons(x, xs), ys) → APPEND(xs, ys)
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, 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))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
APPEND(cons(x, xs), ys) → APPEND(xs, ys)
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
APPEND(cons(x, xs), ys) → APPEND(xs, ys)
From the DPs we obtained the following set of size-change graphs:
GE(s(x), s(y)) → GE(x, y)
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, 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))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
GE(s(x), s(y)) → GE(x, y)
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
GE(s(x), s(y)) → GE(x, y)
From the DPs we obtained the following set of size-change graphs:
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)
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, 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))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
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)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
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)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
From the DPs we obtained the following set of size-change graphs:
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)
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, 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))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
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)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
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)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
From the DPs we obtained the following set of size-change graphs:
QS(n, cons(x, xs)) → QS(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))
QS(n, cons(x, xs)) → QS(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs)))
qsort(xs) → qs(half(length(xs)), xs)
qs(n, nil) → nil
qs(n, cons(x, xs)) → append(qs(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs))), cons(get(n, cons(x, xs)), qs(half(n), filterhigh(get(n, 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))
length(nil) → 0
length(cons(x, xs)) → s(length(xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, nil) → 0
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, cons(y, xs))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(n, cons(x, xs)) → QS(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))
QS(n, cons(x, xs)) → QS(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
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)
length(nil)
length(cons(x0, x1))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
qsort(x0)
qs(x0, nil)
qs(x0, cons(x1, x2))
append(nil, ys)
append(cons(x0, x1), ys)
length(nil)
length(cons(x0, x1))
QS(n, cons(x, xs)) → QS(half(n), filterhigh(get(n, cons(x, xs)), cons(x, xs)))
QS(n, cons(x, xs)) → QS(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(n, cons(x, xs)) → QS(half(n), if2(ge(x, get(n, cons(x, xs))), get(n, cons(x, xs)), x, xs))
QS(n, cons(x, xs)) → QS(half(n), filterlow(get(n, cons(x, xs)), cons(x, xs)))
QS(n, cons(x, xs)) → QS(half(n), if2(ge(x, get(n, cons(x, xs))), get(n, cons(x, xs)), x, xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(n, cons(x, xs)) → QS(half(n), if1(ge(get(n, cons(x, xs)), x), get(n, cons(x, xs)), x, xs))
QS(n, cons(x, xs)) → QS(half(n), if2(ge(x, get(n, cons(x, xs))), get(n, cons(x, xs)), x, xs))
QS(n, cons(x, xs)) → QS(half(n), if1(ge(get(n, cons(x, xs)), x), get(n, cons(x, xs)), x, xs))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), get(x0, cons(x1, nil)), x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if2(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(s(x0), cons(x1, cons(x2, x3))), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, get(x0, cons(x1, nil))), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if2(ge(x0, get(0, cons(x0, cons(x1, x2)))), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(s(x0), cons(x1, cons(x2, x3)))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(n, cons(x, xs)) → QS(half(n), if1(ge(get(n, cons(x, xs)), x), get(n, cons(x, xs)), x, xs))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), get(x0, cons(x1, nil)), x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if2(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(s(x0), cons(x1, cons(x2, x3))), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, get(x0, cons(x1, nil))), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if2(ge(x0, get(0, cons(x0, cons(x1, x2)))), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(s(x0), cons(x1, cons(x2, x3)))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(n, cons(x, xs)) → QS(half(n), if1(ge(get(n, cons(x, xs)), x), get(n, cons(x, xs)), x, xs))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if2(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(s(x0), cons(x1, cons(x2, x3))), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, get(x0, cons(x1, nil))), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if2(ge(x0, get(0, cons(x0, cons(x1, x2)))), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(s(x0), cons(x1, cons(x2, x3)))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(n, cons(x, xs)) → QS(half(n), if1(ge(get(n, cons(x, xs)), x), get(n, cons(x, xs)), x, xs))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(s(x0), cons(x1, cons(x2, x3))), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, get(x0, cons(x1, nil))), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if2(ge(x0, get(0, cons(x0, cons(x1, x2)))), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(s(x0), cons(x1, cons(x2, x3)))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(n, cons(x, xs)) → QS(half(n), if1(ge(get(n, cons(x, xs)), x), get(n, cons(x, xs)), x, xs))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, get(x0, cons(x1, nil))), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if2(ge(x0, get(0, cons(x0, cons(x1, x2)))), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(s(x0), cons(x1, cons(x2, x3)))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(n, cons(x, xs)) → QS(half(n), if1(ge(get(n, cons(x, xs)), x), get(n, cons(x, xs)), x, xs))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if2(ge(x0, get(0, cons(x0, cons(x1, x2)))), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(s(x0), cons(x1, cons(x2, x3)))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, get(0, cons(x0, cons(x1, x2)))), x0, x0, cons(x1, x2)))
QS(n, cons(x, xs)) → QS(half(n), if1(ge(get(n, cons(x, xs)), x), get(n, cons(x, xs)), x, xs))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(s(x0), cons(x1, cons(x2, x3)))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, get(0, cons(x0, cons(x1, x2)))), x0, x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(n, cons(x, xs)) → QS(half(n), if1(ge(get(n, cons(x, xs)), x), get(n, cons(x, xs)), x, xs))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, get(0, cons(x0, cons(x1, x2)))), x0, x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(n, cons(x, xs)) → QS(half(n), if1(ge(get(n, cons(x, xs)), x), get(n, cons(x, xs)), x, xs))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, get(0, cons(x0, cons(x1, x2)))), x0, x0, cons(x1, x2)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(n, cons(x, xs)) → QS(half(n), if1(ge(get(n, cons(x, xs)), x), get(n, cons(x, xs)), x, xs))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(y0, cons(0, y2)) → QS(half(y0), if1(true, get(y0, cons(0, y2)), 0, y2))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), get(x0, cons(x1, nil)), x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if1(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(s(x0), cons(x1, cons(x2, x3))), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(get(x0, cons(x1, nil)), x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if1(ge(get(0, cons(x0, cons(x1, x2))), x0), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(s(x0), cons(x1, cons(x2, x3))), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(y0, cons(0, y2)) → QS(half(y0), if1(true, get(y0, cons(0, y2)), 0, y2))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), get(x0, cons(x1, nil)), x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if1(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(s(x0), cons(x1, cons(x2, x3))), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(get(x0, cons(x1, nil)), x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if1(ge(get(0, cons(x0, cons(x1, x2))), x0), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(s(x0), cons(x1, cons(x2, x3))), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(y0, cons(0, y2)) → QS(half(y0), filterlow(get(y0, cons(0, y2)), y2))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), get(x0, cons(x1, nil)), x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if1(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(s(x0), cons(x1, cons(x2, x3))), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(get(x0, cons(x1, nil)), x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if1(ge(get(0, cons(x0, cons(x1, x2))), x0), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(s(x0), cons(x1, cons(x2, x3))), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(y0, cons(0, y2)) → QS(half(y0), filterlow(get(y0, cons(0, y2)), y2))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if1(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(s(x0), cons(x1, cons(x2, x3))), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(get(x0, cons(x1, nil)), x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if1(ge(get(0, cons(x0, cons(x1, x2))), x0), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(s(x0), cons(x1, cons(x2, x3))), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(y0, cons(0, y2)) → QS(half(y0), filterlow(get(y0, cons(0, y2)), y2))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(s(x0), cons(x1, cons(x2, x3))), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(get(x0, cons(x1, nil)), x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if1(ge(get(0, cons(x0, cons(x1, x2))), x0), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(s(x0), cons(x1, cons(x2, x3))), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(y0, cons(0, y2)) → QS(half(y0), filterlow(get(y0, cons(0, y2)), y2))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(get(x0, cons(x1, nil)), x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if1(ge(get(0, cons(x0, cons(x1, x2))), x0), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(s(x0), cons(x1, cons(x2, x3))), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(y0, cons(0, y2)) → QS(half(y0), filterlow(get(y0, cons(0, y2)), y2))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(0, cons(x0, cons(x1, x2))) → QS(half(0), if1(ge(get(0, cons(x0, cons(x1, x2))), x0), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(s(x0), cons(x1, cons(x2, x3))), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(y0, cons(0, y2)) → QS(half(y0), filterlow(get(y0, cons(0, y2)), y2))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(get(0, cons(x0, cons(x1, x2))), x0), x0, x0, cons(x1, x2)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(s(x0), cons(x1, cons(x2, x3))), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(y0, cons(0, y2)) → QS(half(y0), filterlow(get(y0, cons(0, y2)), y2))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(get(0, cons(x0, cons(x1, x2))), x0), x0, x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(y0, cons(0, y2)) → QS(half(y0), filterlow(get(y0, cons(0, y2)), y2))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), get(0, cons(x0, cons(x1, x2))), x0, cons(x1, x2)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(get(0, cons(x0, cons(x1, x2))), x0), x0, x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(y0, cons(0, y2)) → QS(half(y0), filterlow(get(y0, cons(0, y2)), y2))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(get(0, cons(x0, cons(x1, x2))), x0), x0, x0, cons(x1, x2)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), x0, x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(y0, cons(0, y2)) → QS(half(y0), filterlow(get(y0, cons(0, y2)), y2))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), x0, x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
QS(y0, cons(0, y2)) → QS(half(y0), filterlow(get(y0, cons(0, y2)), y2))
POL(0) = 1
POL(QS(x1, x2)) = x2
POL(cons(x1, x2)) = x1 + x2
POL(false) = 0
POL(filterhigh(x1, x2)) = x2
POL(filterlow(x1, x2)) = x2
POL(ge(x1, x2)) = 0
POL(get(x1, x2)) = 0
POL(half(x1)) = 0
POL(if1(x1, x2, x3, x4)) = x3 + x4
POL(if2(x1, x2, x3, x4)) = x3 + x4
POL(nil) = 0
POL(s(x1)) = 0
POL(true) = 0
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) → cons(x, filterhigh(n, 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
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), x0, x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if2(ge(x1, get(x0, cons(x2, x3))), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
QS(s(x0), cons(x1, cons(x2, x3))) → QS(half(s(x0)), if1(ge(get(x0, cons(x2, x3)), x1), get(x0, cons(x2, x3)), x1, cons(x2, x3)))
POL( QS(x1, x2) ) = x1
POL( half(x1) ) = max{0, x1 - 1}
POL( 0 ) = 0
POL( s(x1) ) = x1 + 2
POL( if1(x1, ..., x4) ) = max{0, 2x3 - 2}
POL( if2(x1, ..., x4) ) = max{0, -1}
POL( ge(x1, x2) ) = max{0, -1}
POL( true ) = 0
POL( filterhigh(x1, x2) ) = 2x1 + 1
POL( cons(x1, x2) ) = 1
POL( false ) = 0
POL( get(x1, x2) ) = x2
POL( nil ) = 2
POL( filterlow(x1, x2) ) = max{0, 2x1 - 2}
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), x0, x0, cons(x1, x2)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
get(n, cons(x, nil)) → x
get(0, cons(x, cons(y, xs))) → x
get(s(n), cons(x, cons(y, xs))) → get(n, 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
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), x0, x0, cons(x1, x2)))
ge(x, 0) → true
ge(s(x), s(y)) → ge(x, y)
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) → cons(x, filterlow(n, xs))
filterlow(n, nil) → nil
ge(0, s(x)) → false
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
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) → cons(x, filterhigh(n, xs))
filterhigh(n, nil) → nil
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))
half(0)
half(s(0))
half(s(s(x0)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
get(x0, nil)
get(x0, cons(x1, nil))
get(0, cons(x0, cons(x1, x2)))
get(s(x0), cons(x1, cons(x2, x3)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if2(ge(x0, x0), x0, x0, cons(x1, x2)))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), x0, x0, cons(x1, x2)))
ge(x, 0) → true
ge(s(x), s(y)) → ge(x, y)
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) → cons(x, filterlow(n, xs))
filterlow(n, nil) → nil
ge(0, s(x)) → false
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
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) → cons(x, filterhigh(n, xs))
filterhigh(n, nil) → nil
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))
half(0)
half(s(0))
half(s(s(x0)))
POL(0) = 0
POL(QS(x1, x2)) = x2
POL(cons(x1, x2)) = 1 + x2
POL(false) = 1
POL(filterhigh(x1, x2)) = x2
POL(filterlow(x1, x2)) = x2
POL(ge(x1, x2)) = 1
POL(half(x1)) = 1 + x1
POL(if1(x1, x2, x3, x4)) = 1 + x4
POL(if2(x1, x2, x3, x4)) = x1 + x4
POL(nil) = 0
POL(s(x1)) = 1
POL(true) = 1
[x, x0, x1, x2, x3, n82, x105, xs61, n100, x127, x116, xs68, n109, n91, x9, y', x63, n41, n23, x31, xs17, x94, n14, x20, n32, x42] 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(x0)) -> false equal_sort[a0](s(x0), 0) -> false equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1) equal_sort[a5](cons(x0, x1), cons(x2, x3)) -> equal_sort[a5](x0, x2) and equal_sort[a5](x1, x3) equal_sort[a5](cons(x0, x1), nil) -> false equal_sort[a5](nil, cons(x0, x1)) -> false equal_sort[a5](nil, nil) -> true equal_sort[a67](witness_sort[a67], witness_sort[a67]) -> true if2'(true, n82, x105, xs61) -> true if2'(false, n100, x127, cons(x116, xs68)) -> if2'(ge(x116, n100), n100, x116, xs68) if2'(false, n100, x127, nil) -> false filterhigh'(n109, nil) -> false equal_bool(ge(x116, n91), true) -> true | filterhigh'(n91, cons(x116, xs68)) -> true equal_bool(ge(x116, n91), true) -> false | filterhigh'(n91, cons(x116, xs68)) -> filterhigh'(n91, xs68) ge(x, 0) -> true ge(s(x9), s(y')) -> ge(x9, y') ge(0, s(x63)) -> false filterlow(n41, nil) -> nil equal_bool(ge(n23, x31), true) -> true | filterlow(n23, cons(x31, xs17)) -> filterlow(n23, xs17) equal_bool(ge(n23, x31), true) -> false | filterlow(n23, cons(x31, xs17)) -> cons(x31, filterlow(n23, xs17)) half(0) -> 0 half(s(0)) -> 0 half(s(s(x94))) -> s(half(x94)) filterhigh(n109, nil) -> nil equal_bool(ge(x116, n91), true) -> true | filterhigh(n91, cons(x116, xs68)) -> filterhigh(n91, xs68) equal_bool(ge(x116, n91), true) -> false | filterhigh(n91, cons(x116, xs68)) -> cons(x116, filterhigh(n91, xs68)) if1(true, n14, x20, cons(x31, xs17)) -> if1(ge(n14, x31), n14, x31, xs17) if1(true, n14, x20, nil) -> nil if1(false, n32, x42, cons(x31, xs17)) -> cons(x42, if1(ge(n32, x31), n32, x31, xs17)) if1(false, n32, x42, nil) -> cons(x42, nil) if2(true, n82, x105, cons(x116, xs68)) -> if2(ge(x116, n82), n82, x116, xs68) if2(true, n82, x105, nil) -> nil if2(false, n100, x127, cons(x116, xs68)) -> cons(x127, if2(ge(x116, n100), n100, x116, xs68)) if2(false, n100, x127, nil) -> cons(x127, nil)
proof of internal # AProVE Commit ID: 9a00b172b26c9abb2d4c4d5eaf341e919eb0fbf1 nowonder 20100222 unpublished dirty Partial correctness of the following Program [x, x0, x1, x2, x3, n82, x105, xs61, n100, x127, x116, xs68, n109, n91, x9, y', x63, n41, n23, x31, xs17, x94, n14, x20, n32, x42] 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(x0)) -> false equal_sort[a0](s(x0), 0) -> false equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1) equal_sort[a5](cons(x0, x1), cons(x2, x3)) -> equal_sort[a5](x0, x2) and equal_sort[a5](x1, x3) equal_sort[a5](cons(x0, x1), nil) -> false equal_sort[a5](nil, cons(x0, x1)) -> false equal_sort[a5](nil, nil) -> true equal_sort[a67](witness_sort[a67], witness_sort[a67]) -> true if2'(true, n82, x105, xs61) -> true if2'(false, n100, x127, cons(x116, xs68)) -> if2'(ge(x116, n100), n100, x116, xs68) if2'(false, n100, x127, nil) -> false filterhigh'(n109, nil) -> false equal_bool(ge(x116, n91), true) -> true | filterhigh'(n91, cons(x116, xs68)) -> true equal_bool(ge(x116, n91), true) -> false | filterhigh'(n91, cons(x116, xs68)) -> filterhigh'(n91, xs68) ge(x, 0) -> true ge(s(x9), s(y')) -> ge(x9, y') ge(0, s(x63)) -> false filterlow(n41, nil) -> nil equal_bool(ge(n23, x31), true) -> true | filterlow(n23, cons(x31, xs17)) -> filterlow(n23, xs17) equal_bool(ge(n23, x31), true) -> false | filterlow(n23, cons(x31, xs17)) -> cons(x31, filterlow(n23, xs17)) half(0) -> 0 half(s(0)) -> 0 half(s(s(x94))) -> s(half(x94)) filterhigh(n109, nil) -> nil equal_bool(ge(x116, n91), true) -> true | filterhigh(n91, cons(x116, xs68)) -> filterhigh(n91, xs68) equal_bool(ge(x116, n91), true) -> false | filterhigh(n91, cons(x116, xs68)) -> cons(x116, filterhigh(n91, xs68)) if1(true, n14, x20, cons(x31, xs17)) -> if1(ge(n14, x31), n14, x31, xs17) if1(true, n14, x20, nil) -> nil if1(false, n32, x42, cons(x31, xs17)) -> cons(x42, if1(ge(n32, x31), n32, x31, xs17)) if1(false, n32, x42, nil) -> cons(x42, nil) if2(true, n82, x105, cons(x116, xs68)) -> if2(ge(x116, n82), n82, x116, xs68) if2(true, n82, x105, nil) -> nil if2(false, n100, x127, cons(x116, xs68)) -> cons(x127, if2(ge(x116, n100), n100, x116, xs68)) if2(false, n100, x127, nil) -> cons(x127, nil) using the following formula: x0':sort[a0],x1':sort[a0],x2:sort[a0].if2'(ge(x0', x0'), x0', x0', cons(x1', x2))=true could be successfully shown: (0) Formula (1) Induction by data structure [EQUIVALENT] (2) AND (3) Formula (4) Symbolic evaluation [EQUIVALENT] (5) YES (6) Formula (7) Symbolic evaluation [EQUIVALENT] (8) Formula (9) Case Analysis [EQUIVALENT] (10) AND (11) Formula (12) Case Analysis [EQUIVALENT] (13) AND (14) Formula (15) Inverse Substitution [SOUND] (16) Formula (17) Induction by data structure [SOUND] (18) AND (19) Formula (20) Symbolic evaluation [EQUIVALENT] (21) YES (22) Formula (23) Symbolic evaluation under hypothesis [EQUIVALENT] (24) YES (25) Formula (26) Inverse Substitution [SOUND] (27) Formula (28) Induction by data structure [SOUND] (29) AND (30) Formula (31) Symbolic evaluation [EQUIVALENT] (32) YES (33) Formula (34) Symbolic evaluation under hypothesis [EQUIVALENT] (35) YES (36) Formula (37) Case Analysis [EQUIVALENT] (38) AND (39) Formula (40) Inverse Substitution [SOUND] (41) Formula (42) Induction by data structure [SOUND] (43) AND (44) Formula (45) Symbolic evaluation [EQUIVALENT] (46) YES (47) Formula (48) Symbolic evaluation under hypothesis [EQUIVALENT] (49) YES (50) Formula (51) Inverse Substitution [SOUND] (52) Formula (53) Induction by data structure [SOUND] (54) AND (55) Formula (56) Symbolic evaluation [EQUIVALENT] (57) YES (58) Formula (59) Symbolic evaluation under hypothesis [EQUIVALENT] (60) YES ---------------------------------------- (0) Obligation: Formula: x0':sort[a0],x1':sort[a0],x2:sort[a0].if2'(ge(x0', x0'), x0', x0', cons(x1', x2))=true There are no hypotheses. ---------------------------------------- (1) Induction by data structure (EQUIVALENT) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: x1':sort[a0],x2:sort[a0].if2'(ge(0, 0), 0, 0, cons(x1', x2))=true There are no hypotheses. 1. Step Case: Formula: n:sort[a0],x1':sort[a0],x2:sort[a0].if2'(ge(s(n), s(n)), s(n), s(n), cons(x1', x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (2) Complex Obligation (AND) ---------------------------------------- (3) Obligation: Formula: x1':sort[a0],x2:sort[a0].if2'(ge(0, 0), 0, 0, cons(x1', x2))=true There are no hypotheses. ---------------------------------------- (4) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (5) YES ---------------------------------------- (6) Obligation: Formula: n:sort[a0],x1':sort[a0],x2:sort[a0].if2'(ge(s(n), s(n)), s(n), s(n), cons(x1', x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (7) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: n:sort[a0],x1':sort[a0],x2:sort[a0].if2'(ge(n, n), s(n), s(n), cons(x1', x2))=true ---------------------------------------- (8) Obligation: Formula: n:sort[a0],x1':sort[a0],x2:sort[a0].if2'(ge(n, n), s(n), s(n), cons(x1', x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (9) Case Analysis (EQUIVALENT) Case analysis leads to the following new obligations: Formula: n:sort[a0],x2:sort[a0].if2'(ge(n, n), s(n), s(n), cons(0, x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true Formula: n:sort[a0],x_1:sort[a0],x2:sort[a0].if2'(ge(n, n), s(n), s(n), cons(s(x_1), x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (10) Complex Obligation (AND) ---------------------------------------- (11) Obligation: Formula: n:sort[a0],x2:sort[a0].if2'(ge(n, n), s(n), s(n), cons(0, x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (12) Case Analysis (EQUIVALENT) Case analysis leads to the following new obligations: Formula: n:sort[a0].if2'(ge(n, n), s(n), s(n), cons(0, 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true Formula: n:sort[a0],x_1:sort[a0].if2'(ge(n, n), s(n), s(n), cons(0, s(x_1)))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (13) Complex Obligation (AND) ---------------------------------------- (14) Obligation: Formula: n:sort[a0].if2'(ge(n, n), s(n), s(n), cons(0, 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (15) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0].if2'(ge(n, n), n', n', cons(0, 0))=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (16) Obligation: Formula: n:sort[a0],n':sort[a0].if2'(ge(n, n), n', n', cons(0, 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (17) Induction by data structure (SOUND) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: n':sort[a0].if2'(ge(0, 0), n', n', cons(0, 0))=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0].if2'(ge(s(n''), s(n'')), n', n', cons(0, 0))=true Hypotheses: n'':sort[a0],!n':sort[a0].if2'(ge(n'', n''), n', n', cons(0, 0))=true ---------------------------------------- (18) Complex Obligation (AND) ---------------------------------------- (19) Obligation: Formula: n':sort[a0].if2'(ge(0, 0), n', n', cons(0, 0))=true There are no hypotheses. ---------------------------------------- (20) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (21) YES ---------------------------------------- (22) Obligation: Formula: n'':sort[a0],n':sort[a0].if2'(ge(s(n''), s(n'')), n', n', cons(0, 0))=true Hypotheses: n'':sort[a0],!n':sort[a0].if2'(ge(n'', n''), n', n', cons(0, 0))=true ---------------------------------------- (23) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n'':sort[a0],!n':sort[a0].if2'(ge(n'', n''), n', n', cons(0, 0))=true ---------------------------------------- (24) YES ---------------------------------------- (25) Obligation: Formula: n:sort[a0],x_1:sort[a0].if2'(ge(n, n), s(n), s(n), cons(0, s(x_1)))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (26) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0],x_1:sort[a0].if2'(ge(n, n), n', n', cons(0, s(x_1)))=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (27) Obligation: Formula: n:sort[a0],n':sort[a0],x_1:sort[a0].if2'(ge(n, n), n', n', cons(0, s(x_1)))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (28) Induction by data structure (SOUND) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: n':sort[a0],x_1:sort[a0].if2'(ge(0, 0), n', n', cons(0, s(x_1)))=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0].if2'(ge(s(n''), s(n'')), n', n', cons(0, s(x_1)))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if2'(ge(n'', n''), n', n', cons(0, s(x_1)))=true ---------------------------------------- (29) Complex Obligation (AND) ---------------------------------------- (30) Obligation: Formula: n':sort[a0],x_1:sort[a0].if2'(ge(0, 0), n', n', cons(0, s(x_1)))=true There are no hypotheses. ---------------------------------------- (31) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (32) YES ---------------------------------------- (33) Obligation: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0].if2'(ge(s(n''), s(n'')), n', n', cons(0, s(x_1)))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if2'(ge(n'', n''), n', n', cons(0, s(x_1)))=true ---------------------------------------- (34) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if2'(ge(n'', n''), n', n', cons(0, s(x_1)))=true ---------------------------------------- (35) YES ---------------------------------------- (36) Obligation: Formula: n:sort[a0],x_1:sort[a0],x2:sort[a0].if2'(ge(n, n), s(n), s(n), cons(s(x_1), x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (37) Case Analysis (EQUIVALENT) Case analysis leads to the following new obligations: Formula: n:sort[a0],x_1:sort[a0].if2'(ge(n, n), s(n), s(n), cons(s(x_1), 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true Formula: n:sort[a0],x_1:sort[a0],x_1':sort[a0].if2'(ge(n, n), s(n), s(n), cons(s(x_1), s(x_1')))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (38) Complex Obligation (AND) ---------------------------------------- (39) Obligation: Formula: n:sort[a0],x_1:sort[a0].if2'(ge(n, n), s(n), s(n), cons(s(x_1), 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (40) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0],x_1:sort[a0].if2'(ge(n, n), n', n', cons(s(x_1), 0))=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (41) Obligation: Formula: n:sort[a0],n':sort[a0],x_1:sort[a0].if2'(ge(n, n), n', n', cons(s(x_1), 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (42) Induction by data structure (SOUND) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: n':sort[a0],x_1:sort[a0].if2'(ge(0, 0), n', n', cons(s(x_1), 0))=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0].if2'(ge(s(n''), s(n'')), n', n', cons(s(x_1), 0))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if2'(ge(n'', n''), n', n', cons(s(x_1), 0))=true ---------------------------------------- (43) Complex Obligation (AND) ---------------------------------------- (44) Obligation: Formula: n':sort[a0],x_1:sort[a0].if2'(ge(0, 0), n', n', cons(s(x_1), 0))=true There are no hypotheses. ---------------------------------------- (45) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (46) YES ---------------------------------------- (47) Obligation: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0].if2'(ge(s(n''), s(n'')), n', n', cons(s(x_1), 0))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if2'(ge(n'', n''), n', n', cons(s(x_1), 0))=true ---------------------------------------- (48) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if2'(ge(n'', n''), n', n', cons(s(x_1), 0))=true ---------------------------------------- (49) YES ---------------------------------------- (50) Obligation: Formula: n:sort[a0],x_1:sort[a0],x_1':sort[a0].if2'(ge(n, n), s(n), s(n), cons(s(x_1), s(x_1')))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (51) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0],x_1:sort[a0],x_1':sort[a0].if2'(ge(n, n), n', n', cons(s(x_1), s(x_1')))=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (52) Obligation: Formula: n:sort[a0],n':sort[a0],x_1:sort[a0],x_1':sort[a0].if2'(ge(n, n), n', n', cons(s(x_1), s(x_1')))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if2'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (53) Induction by data structure (SOUND) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: n':sort[a0],x_1:sort[a0],x_1':sort[a0].if2'(ge(0, 0), n', n', cons(s(x_1), s(x_1')))=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0],x_1':sort[a0].if2'(ge(s(n''), s(n'')), n', n', cons(s(x_1), s(x_1')))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0],!x_1':sort[a0].if2'(ge(n'', n''), n', n', cons(s(x_1), s(x_1')))=true ---------------------------------------- (54) Complex Obligation (AND) ---------------------------------------- (55) Obligation: Formula: n':sort[a0],x_1:sort[a0],x_1':sort[a0].if2'(ge(0, 0), n', n', cons(s(x_1), s(x_1')))=true There are no hypotheses. ---------------------------------------- (56) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (57) YES ---------------------------------------- (58) Obligation: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0],x_1':sort[a0].if2'(ge(s(n''), s(n'')), n', n', cons(s(x_1), s(x_1')))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0],!x_1':sort[a0].if2'(ge(n'', n''), n', n', cons(s(x_1), s(x_1')))=true ---------------------------------------- (59) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0],!x_1':sort[a0].if2'(ge(n'', n''), n', n', cons(s(x_1), s(x_1')))=true ---------------------------------------- (60) YES
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(x0, cons(x1, nil)) → QS(half(x0), if1(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), x0, x0, cons(x1, x2)))
ge(x, 0) → true
ge(s(x), s(y)) → ge(x, y)
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) → cons(x, filterlow(n, xs))
filterlow(n, nil) → nil
ge(0, s(x)) → false
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
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) → cons(x, filterhigh(n, xs))
filterhigh(n, nil) → nil
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))
half(0)
half(s(0))
half(s(s(x0)))
POL(0) = 1
POL(QS(x1, x2)) = x2
POL(cons(x1, x2)) = 1 + x2
POL(false) = 0
POL(filterhigh(x1, x2)) = x2
POL(filterlow(x1, x2)) = x2
POL(ge(x1, x2)) = 1
POL(half(x1)) = x1
POL(if1(x1, x2, x3, x4)) = 1 + x4
POL(if2(x1, x2, x3, x4)) = 1 + x4
POL(nil) = 1
POL(s(x1)) = 1 + x1
POL(true) = 1
[x, x0, x1, x2, x3, n14, x20, xs10, n32, x42, x31, xs17, n41, n23, x9, y', x63, x94, n109, n91, x116, xs68, n82, x105, n100, x127] 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(x0)) -> false equal_sort[a0](s(x0), 0) -> false equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1) equal_sort[a5](cons(x0, x1), cons(x2, x3)) -> equal_sort[a5](x0, x2) and equal_sort[a5](x1, x3) equal_sort[a5](cons(x0, x1), nil) -> false equal_sort[a5](nil, cons(x0, x1)) -> false equal_sort[a5](nil, nil) -> true equal_sort[a64](witness_sort[a64], witness_sort[a64]) -> true if1'(true, n14, x20, xs10) -> true if1'(false, n32, x42, cons(x31, xs17)) -> if1'(ge(n32, x31), n32, x31, xs17) if1'(false, n32, x42, nil) -> false filterlow'(n41, nil) -> false equal_bool(ge(n23, x31), true) -> true | filterlow'(n23, cons(x31, xs17)) -> true equal_bool(ge(n23, x31), true) -> false | filterlow'(n23, cons(x31, xs17)) -> filterlow'(n23, xs17) ge(x, 0) -> true ge(s(x9), s(y')) -> ge(x9, y') ge(0, s(x63)) -> false filterlow(n41, nil) -> nil equal_bool(ge(n23, x31), true) -> true | filterlow(n23, cons(x31, xs17)) -> filterlow(n23, xs17) equal_bool(ge(n23, x31), true) -> false | filterlow(n23, cons(x31, xs17)) -> cons(x31, filterlow(n23, xs17)) half(0) -> 0 half(s(0)) -> 0 half(s(s(x94))) -> s(half(x94)) filterhigh(n109, nil) -> nil equal_bool(ge(x116, n91), true) -> true | filterhigh(n91, cons(x116, xs68)) -> filterhigh(n91, xs68) equal_bool(ge(x116, n91), true) -> false | filterhigh(n91, cons(x116, xs68)) -> cons(x116, filterhigh(n91, xs68)) if1(true, n14, x20, cons(x31, xs17)) -> if1(ge(n14, x31), n14, x31, xs17) if1(true, n14, x20, nil) -> nil if1(false, n32, x42, cons(x31, xs17)) -> cons(x42, if1(ge(n32, x31), n32, x31, xs17)) if1(false, n32, x42, nil) -> cons(x42, nil) if2(true, n82, x105, cons(x116, xs68)) -> if2(ge(x116, n82), n82, x116, xs68) if2(true, n82, x105, nil) -> nil if2(false, n100, x127, cons(x116, xs68)) -> cons(x127, if2(ge(x116, n100), n100, x116, xs68)) if2(false, n100, x127, nil) -> cons(x127, nil)
proof of internal # AProVE Commit ID: 9a00b172b26c9abb2d4c4d5eaf341e919eb0fbf1 nowonder 20100222 unpublished dirty Partial correctness of the following Program [x, x0, x1, x2, x3, n14, x20, xs10, n32, x42, x31, xs17, n41, n23, x9, y', x63, x94, n109, n91, x116, xs68, n82, x105, n100, x127] 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(x0)) -> false equal_sort[a0](s(x0), 0) -> false equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1) equal_sort[a5](cons(x0, x1), cons(x2, x3)) -> equal_sort[a5](x0, x2) and equal_sort[a5](x1, x3) equal_sort[a5](cons(x0, x1), nil) -> false equal_sort[a5](nil, cons(x0, x1)) -> false equal_sort[a5](nil, nil) -> true equal_sort[a64](witness_sort[a64], witness_sort[a64]) -> true if1'(true, n14, x20, xs10) -> true if1'(false, n32, x42, cons(x31, xs17)) -> if1'(ge(n32, x31), n32, x31, xs17) if1'(false, n32, x42, nil) -> false filterlow'(n41, nil) -> false equal_bool(ge(n23, x31), true) -> true | filterlow'(n23, cons(x31, xs17)) -> true equal_bool(ge(n23, x31), true) -> false | filterlow'(n23, cons(x31, xs17)) -> filterlow'(n23, xs17) ge(x, 0) -> true ge(s(x9), s(y')) -> ge(x9, y') ge(0, s(x63)) -> false filterlow(n41, nil) -> nil equal_bool(ge(n23, x31), true) -> true | filterlow(n23, cons(x31, xs17)) -> filterlow(n23, xs17) equal_bool(ge(n23, x31), true) -> false | filterlow(n23, cons(x31, xs17)) -> cons(x31, filterlow(n23, xs17)) half(0) -> 0 half(s(0)) -> 0 half(s(s(x94))) -> s(half(x94)) filterhigh(n109, nil) -> nil equal_bool(ge(x116, n91), true) -> true | filterhigh(n91, cons(x116, xs68)) -> filterhigh(n91, xs68) equal_bool(ge(x116, n91), true) -> false | filterhigh(n91, cons(x116, xs68)) -> cons(x116, filterhigh(n91, xs68)) if1(true, n14, x20, cons(x31, xs17)) -> if1(ge(n14, x31), n14, x31, xs17) if1(true, n14, x20, nil) -> nil if1(false, n32, x42, cons(x31, xs17)) -> cons(x42, if1(ge(n32, x31), n32, x31, xs17)) if1(false, n32, x42, nil) -> cons(x42, nil) if2(true, n82, x105, cons(x116, xs68)) -> if2(ge(x116, n82), n82, x116, xs68) if2(true, n82, x105, nil) -> nil if2(false, n100, x127, cons(x116, xs68)) -> cons(x127, if2(ge(x116, n100), n100, x116, xs68)) if2(false, n100, x127, nil) -> cons(x127, nil) using the following formula: x1':sort[a0].if1'(ge(x1', x1'), x1', x1', nil)=true could be successfully shown: (0) Formula (1) Induction by data structure [EQUIVALENT] (2) AND (3) Formula (4) Symbolic evaluation [EQUIVALENT] (5) YES (6) Formula (7) Symbolic evaluation [EQUIVALENT] (8) Formula (9) Hypothesis Lifting [EQUIVALENT] (10) Formula (11) Inverse Substitution [SOUND] (12) Formula (13) Inverse Substitution [SOUND] (14) Formula (15) Induction by data structure [EQUIVALENT] (16) AND (17) Formula (18) Symbolic evaluation [EQUIVALENT] (19) YES (20) Formula (21) Symbolic evaluation [EQUIVALENT] (22) YES ---------------------------------------- (0) Obligation: Formula: x1':sort[a0].if1'(ge(x1', x1'), x1', x1', nil)=true There are no hypotheses. ---------------------------------------- (1) Induction by data structure (EQUIVALENT) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: if1'(ge(0, 0), 0, 0, nil)=true There are no hypotheses. 1. Step Case: Formula: n:sort[a0].if1'(ge(s(n), s(n)), s(n), s(n), nil)=true Hypotheses: n:sort[a0].if1'(ge(n, n), n, n, nil)=true ---------------------------------------- (2) Complex Obligation (AND) ---------------------------------------- (3) Obligation: Formula: if1'(ge(0, 0), 0, 0, nil)=true There are no hypotheses. ---------------------------------------- (4) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (5) YES ---------------------------------------- (6) Obligation: Formula: n:sort[a0].if1'(ge(s(n), s(n)), s(n), s(n), nil)=true Hypotheses: n:sort[a0].if1'(ge(n, n), n, n, nil)=true ---------------------------------------- (7) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: n:sort[a0].if1'(ge(n, n), s(n), s(n), nil)=true ---------------------------------------- (8) Obligation: Formula: n:sort[a0].if1'(ge(n, n), s(n), s(n), nil)=true Hypotheses: n:sort[a0].if1'(ge(n, n), n, n, nil)=true ---------------------------------------- (9) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].(if1'(ge(n, n), n, n, nil)=true->if1'(ge(n, n), s(n), s(n), nil)=true) There are no hypotheses. ---------------------------------------- (10) Obligation: Formula: n:sort[a0].(if1'(ge(n, n), n, n, nil)=true->if1'(ge(n, n), s(n), s(n), nil)=true) There are no hypotheses. ---------------------------------------- (11) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n':bool,n:sort[a0].(if1'(n', n, n, nil)=true->if1'(n', s(n), s(n), nil)=true) Inverse substitution used: [ge(n, n)/n'] ---------------------------------------- (12) Obligation: Formula: n':bool,n:sort[a0].(if1'(n', n, n, nil)=true->if1'(n', s(n), s(n), nil)=true) There are no hypotheses. ---------------------------------------- (13) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n':bool,n:sort[a0],n'':sort[a0].(if1'(n', n, n, nil)=true->if1'(n', n'', n'', nil)=true) Inverse substitution used: [s(n)/n''] ---------------------------------------- (14) Obligation: Formula: n':bool,n:sort[a0],n'':sort[a0].(if1'(n', n, n, nil)=true->if1'(n', n'', n'', nil)=true) There are no hypotheses. ---------------------------------------- (15) Induction by data structure (EQUIVALENT) Induction by data structure bool generates the following cases: 1. Base Case: Formula: n:sort[a0],n'':sort[a0].(if1'(true, n, n, nil)=true->if1'(true, n'', n'', nil)=true) There are no hypotheses. 1. Base Case: Formula: n:sort[a0],n'':sort[a0].(if1'(false, n, n, nil)=true->if1'(false, n'', n'', nil)=true) There are no hypotheses. ---------------------------------------- (16) Complex Obligation (AND) ---------------------------------------- (17) Obligation: Formula: n:sort[a0],n'':sort[a0].(if1'(true, n, n, nil)=true->if1'(true, n'', n'', nil)=true) There are no hypotheses. ---------------------------------------- (18) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (19) YES ---------------------------------------- (20) Obligation: Formula: n:sort[a0],n'':sort[a0].(if1'(false, n, n, nil)=true->if1'(false, n'', n'', nil)=true) There are no hypotheses. ---------------------------------------- (21) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (22) YES
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
QS(0, cons(x0, cons(x1, x2))) → QS(0, if1(ge(x0, x0), x0, x0, cons(x1, x2)))
ge(x, 0) → true
ge(s(x), s(y)) → ge(x, y)
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) → cons(x, filterlow(n, xs))
filterlow(n, nil) → nil
ge(0, s(x)) → false
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
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) → cons(x, filterhigh(n, xs))
filterhigh(n, nil) → nil
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))
half(0)
half(s(0))
half(s(s(x0)))
POL(0) = 1
POL(QS(x1, x2)) = x2
POL(cons(x1, x2)) = 1 + x2
POL(false) = 0
POL(filterhigh(x1, x2)) = x2
POL(filterlow(x1, x2)) = x2
POL(ge(x1, x2)) = 0
POL(half(x1)) = x1
POL(if1(x1, x2, x3, x4)) = 1 + x4
POL(if2(x1, x2, x3, x4)) = 1 + x4
POL(nil) = 0
POL(s(x1)) = 1 + x1
POL(true) = 0
[x, x0, x1, x2, x3, n14, x20, xs10, n32, x42, x31, xs17, n41, n23, x9, y', x63, x94, n109, n91, x116, xs68, n82, x105, n100, x127] 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(x0)) -> false equal_sort[a0](s(x0), 0) -> false equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1) equal_sort[a5](cons(x0, x1), cons(x2, x3)) -> equal_sort[a5](x0, x2) and equal_sort[a5](x1, x3) equal_sort[a5](cons(x0, x1), nil) -> false equal_sort[a5](nil, cons(x0, x1)) -> false equal_sort[a5](nil, nil) -> true equal_sort[a62](witness_sort[a62], witness_sort[a62]) -> true if1'(true, n14, x20, xs10) -> true if1'(false, n32, x42, cons(x31, xs17)) -> if1'(ge(n32, x31), n32, x31, xs17) if1'(false, n32, x42, nil) -> false filterlow'(n41, nil) -> false equal_bool(ge(n23, x31), true) -> true | filterlow'(n23, cons(x31, xs17)) -> true equal_bool(ge(n23, x31), true) -> false | filterlow'(n23, cons(x31, xs17)) -> filterlow'(n23, xs17) ge(x, 0) -> true ge(s(x9), s(y')) -> ge(x9, y') ge(0, s(x63)) -> false filterlow(n41, nil) -> nil equal_bool(ge(n23, x31), true) -> true | filterlow(n23, cons(x31, xs17)) -> filterlow(n23, xs17) equal_bool(ge(n23, x31), true) -> false | filterlow(n23, cons(x31, xs17)) -> cons(x31, filterlow(n23, xs17)) half(0) -> 0 half(s(0)) -> 0 half(s(s(x94))) -> s(half(x94)) filterhigh(n109, nil) -> nil equal_bool(ge(x116, n91), true) -> true | filterhigh(n91, cons(x116, xs68)) -> filterhigh(n91, xs68) equal_bool(ge(x116, n91), true) -> false | filterhigh(n91, cons(x116, xs68)) -> cons(x116, filterhigh(n91, xs68)) if1(true, n14, x20, cons(x31, xs17)) -> if1(ge(n14, x31), n14, x31, xs17) if1(true, n14, x20, nil) -> nil if1(false, n32, x42, cons(x31, xs17)) -> cons(x42, if1(ge(n32, x31), n32, x31, xs17)) if1(false, n32, x42, nil) -> cons(x42, nil) if2(true, n82, x105, cons(x116, xs68)) -> if2(ge(x116, n82), n82, x116, xs68) if2(true, n82, x105, nil) -> nil if2(false, n100, x127, cons(x116, xs68)) -> cons(x127, if2(ge(x116, n100), n100, x116, xs68)) if2(false, n100, x127, nil) -> cons(x127, nil)
proof of internal # AProVE Commit ID: 9a00b172b26c9abb2d4c4d5eaf341e919eb0fbf1 nowonder 20100222 unpublished dirty Partial correctness of the following Program [x, x0, x1, x2, x3, n14, x20, xs10, n32, x42, x31, xs17, n41, n23, x9, y', x63, x94, n109, n91, x116, xs68, n82, x105, n100, x127] 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(x0)) -> false equal_sort[a0](s(x0), 0) -> false equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1) equal_sort[a5](cons(x0, x1), cons(x2, x3)) -> equal_sort[a5](x0, x2) and equal_sort[a5](x1, x3) equal_sort[a5](cons(x0, x1), nil) -> false equal_sort[a5](nil, cons(x0, x1)) -> false equal_sort[a5](nil, nil) -> true equal_sort[a62](witness_sort[a62], witness_sort[a62]) -> true if1'(true, n14, x20, xs10) -> true if1'(false, n32, x42, cons(x31, xs17)) -> if1'(ge(n32, x31), n32, x31, xs17) if1'(false, n32, x42, nil) -> false filterlow'(n41, nil) -> false equal_bool(ge(n23, x31), true) -> true | filterlow'(n23, cons(x31, xs17)) -> true equal_bool(ge(n23, x31), true) -> false | filterlow'(n23, cons(x31, xs17)) -> filterlow'(n23, xs17) ge(x, 0) -> true ge(s(x9), s(y')) -> ge(x9, y') ge(0, s(x63)) -> false filterlow(n41, nil) -> nil equal_bool(ge(n23, x31), true) -> true | filterlow(n23, cons(x31, xs17)) -> filterlow(n23, xs17) equal_bool(ge(n23, x31), true) -> false | filterlow(n23, cons(x31, xs17)) -> cons(x31, filterlow(n23, xs17)) half(0) -> 0 half(s(0)) -> 0 half(s(s(x94))) -> s(half(x94)) filterhigh(n109, nil) -> nil equal_bool(ge(x116, n91), true) -> true | filterhigh(n91, cons(x116, xs68)) -> filterhigh(n91, xs68) equal_bool(ge(x116, n91), true) -> false | filterhigh(n91, cons(x116, xs68)) -> cons(x116, filterhigh(n91, xs68)) if1(true, n14, x20, cons(x31, xs17)) -> if1(ge(n14, x31), n14, x31, xs17) if1(true, n14, x20, nil) -> nil if1(false, n32, x42, cons(x31, xs17)) -> cons(x42, if1(ge(n32, x31), n32, x31, xs17)) if1(false, n32, x42, nil) -> cons(x42, nil) if2(true, n82, x105, cons(x116, xs68)) -> if2(ge(x116, n82), n82, x116, xs68) if2(true, n82, x105, nil) -> nil if2(false, n100, x127, cons(x116, xs68)) -> cons(x127, if2(ge(x116, n100), n100, x116, xs68)) if2(false, n100, x127, nil) -> cons(x127, nil) using the following formula: x0':sort[a0],x1':sort[a0],x2:sort[a0].if1'(ge(x0', x0'), x0', x0', cons(x1', x2))=true could be successfully shown: (0) Formula (1) Induction by data structure [EQUIVALENT] (2) AND (3) Formula (4) Symbolic evaluation [EQUIVALENT] (5) YES (6) Formula (7) Symbolic evaluation [EQUIVALENT] (8) Formula (9) Case Analysis [EQUIVALENT] (10) AND (11) Formula (12) Case Analysis [EQUIVALENT] (13) AND (14) Formula (15) Inverse Substitution [SOUND] (16) Formula (17) Induction by data structure [SOUND] (18) AND (19) Formula (20) Symbolic evaluation [EQUIVALENT] (21) YES (22) Formula (23) Symbolic evaluation under hypothesis [EQUIVALENT] (24) YES (25) Formula (26) Inverse Substitution [SOUND] (27) Formula (28) Induction by data structure [SOUND] (29) AND (30) Formula (31) Symbolic evaluation [EQUIVALENT] (32) YES (33) Formula (34) Symbolic evaluation under hypothesis [EQUIVALENT] (35) YES (36) Formula (37) Case Analysis [EQUIVALENT] (38) AND (39) Formula (40) Inverse Substitution [SOUND] (41) Formula (42) Induction by data structure [SOUND] (43) AND (44) Formula (45) Symbolic evaluation [EQUIVALENT] (46) YES (47) Formula (48) Symbolic evaluation under hypothesis [EQUIVALENT] (49) YES (50) Formula (51) Inverse Substitution [SOUND] (52) Formula (53) Induction by data structure [SOUND] (54) AND (55) Formula (56) Symbolic evaluation [EQUIVALENT] (57) YES (58) Formula (59) Symbolic evaluation under hypothesis [EQUIVALENT] (60) YES ---------------------------------------- (0) Obligation: Formula: x0':sort[a0],x1':sort[a0],x2:sort[a0].if1'(ge(x0', x0'), x0', x0', cons(x1', x2))=true There are no hypotheses. ---------------------------------------- (1) Induction by data structure (EQUIVALENT) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: x1':sort[a0],x2:sort[a0].if1'(ge(0, 0), 0, 0, cons(x1', x2))=true There are no hypotheses. 1. Step Case: Formula: n:sort[a0],x1':sort[a0],x2:sort[a0].if1'(ge(s(n), s(n)), s(n), s(n), cons(x1', x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (2) Complex Obligation (AND) ---------------------------------------- (3) Obligation: Formula: x1':sort[a0],x2:sort[a0].if1'(ge(0, 0), 0, 0, cons(x1', x2))=true There are no hypotheses. ---------------------------------------- (4) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (5) YES ---------------------------------------- (6) Obligation: Formula: n:sort[a0],x1':sort[a0],x2:sort[a0].if1'(ge(s(n), s(n)), s(n), s(n), cons(x1', x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (7) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: n:sort[a0],x1':sort[a0],x2:sort[a0].if1'(ge(n, n), s(n), s(n), cons(x1', x2))=true ---------------------------------------- (8) Obligation: Formula: n:sort[a0],x1':sort[a0],x2:sort[a0].if1'(ge(n, n), s(n), s(n), cons(x1', x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (9) Case Analysis (EQUIVALENT) Case analysis leads to the following new obligations: Formula: n:sort[a0],x2:sort[a0].if1'(ge(n, n), s(n), s(n), cons(0, x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true Formula: n:sort[a0],x_1:sort[a0],x2:sort[a0].if1'(ge(n, n), s(n), s(n), cons(s(x_1), x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (10) Complex Obligation (AND) ---------------------------------------- (11) Obligation: Formula: n:sort[a0],x2:sort[a0].if1'(ge(n, n), s(n), s(n), cons(0, x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (12) Case Analysis (EQUIVALENT) Case analysis leads to the following new obligations: Formula: n:sort[a0].if1'(ge(n, n), s(n), s(n), cons(0, 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true Formula: n:sort[a0],x_1:sort[a0].if1'(ge(n, n), s(n), s(n), cons(0, s(x_1)))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (13) Complex Obligation (AND) ---------------------------------------- (14) Obligation: Formula: n:sort[a0].if1'(ge(n, n), s(n), s(n), cons(0, 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (15) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0].if1'(ge(n, n), n', n', cons(0, 0))=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (16) Obligation: Formula: n:sort[a0],n':sort[a0].if1'(ge(n, n), n', n', cons(0, 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (17) Induction by data structure (SOUND) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: n':sort[a0].if1'(ge(0, 0), n', n', cons(0, 0))=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0].if1'(ge(s(n''), s(n'')), n', n', cons(0, 0))=true Hypotheses: n'':sort[a0],!n':sort[a0].if1'(ge(n'', n''), n', n', cons(0, 0))=true ---------------------------------------- (18) Complex Obligation (AND) ---------------------------------------- (19) Obligation: Formula: n':sort[a0].if1'(ge(0, 0), n', n', cons(0, 0))=true There are no hypotheses. ---------------------------------------- (20) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (21) YES ---------------------------------------- (22) Obligation: Formula: n'':sort[a0],n':sort[a0].if1'(ge(s(n''), s(n'')), n', n', cons(0, 0))=true Hypotheses: n'':sort[a0],!n':sort[a0].if1'(ge(n'', n''), n', n', cons(0, 0))=true ---------------------------------------- (23) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n'':sort[a0],!n':sort[a0].if1'(ge(n'', n''), n', n', cons(0, 0))=true ---------------------------------------- (24) YES ---------------------------------------- (25) Obligation: Formula: n:sort[a0],x_1:sort[a0].if1'(ge(n, n), s(n), s(n), cons(0, s(x_1)))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (26) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0],x_1:sort[a0].if1'(ge(n, n), n', n', cons(0, s(x_1)))=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (27) Obligation: Formula: n:sort[a0],n':sort[a0],x_1:sort[a0].if1'(ge(n, n), n', n', cons(0, s(x_1)))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (28) Induction by data structure (SOUND) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: n':sort[a0],x_1:sort[a0].if1'(ge(0, 0), n', n', cons(0, s(x_1)))=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0].if1'(ge(s(n''), s(n'')), n', n', cons(0, s(x_1)))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if1'(ge(n'', n''), n', n', cons(0, s(x_1)))=true ---------------------------------------- (29) Complex Obligation (AND) ---------------------------------------- (30) Obligation: Formula: n':sort[a0],x_1:sort[a0].if1'(ge(0, 0), n', n', cons(0, s(x_1)))=true There are no hypotheses. ---------------------------------------- (31) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (32) YES ---------------------------------------- (33) Obligation: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0].if1'(ge(s(n''), s(n'')), n', n', cons(0, s(x_1)))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if1'(ge(n'', n''), n', n', cons(0, s(x_1)))=true ---------------------------------------- (34) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if1'(ge(n'', n''), n', n', cons(0, s(x_1)))=true ---------------------------------------- (35) YES ---------------------------------------- (36) Obligation: Formula: n:sort[a0],x_1:sort[a0],x2:sort[a0].if1'(ge(n, n), s(n), s(n), cons(s(x_1), x2))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (37) Case Analysis (EQUIVALENT) Case analysis leads to the following new obligations: Formula: n:sort[a0],x_1:sort[a0].if1'(ge(n, n), s(n), s(n), cons(s(x_1), 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true Formula: n:sort[a0],x_1:sort[a0],x_1':sort[a0].if1'(ge(n, n), s(n), s(n), cons(s(x_1), s(x_1')))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (38) Complex Obligation (AND) ---------------------------------------- (39) Obligation: Formula: n:sort[a0],x_1:sort[a0].if1'(ge(n, n), s(n), s(n), cons(s(x_1), 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (40) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0],x_1:sort[a0].if1'(ge(n, n), n', n', cons(s(x_1), 0))=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (41) Obligation: Formula: n:sort[a0],n':sort[a0],x_1:sort[a0].if1'(ge(n, n), n', n', cons(s(x_1), 0))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (42) Induction by data structure (SOUND) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: n':sort[a0],x_1:sort[a0].if1'(ge(0, 0), n', n', cons(s(x_1), 0))=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0].if1'(ge(s(n''), s(n'')), n', n', cons(s(x_1), 0))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if1'(ge(n'', n''), n', n', cons(s(x_1), 0))=true ---------------------------------------- (43) Complex Obligation (AND) ---------------------------------------- (44) Obligation: Formula: n':sort[a0],x_1:sort[a0].if1'(ge(0, 0), n', n', cons(s(x_1), 0))=true There are no hypotheses. ---------------------------------------- (45) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (46) YES ---------------------------------------- (47) Obligation: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0].if1'(ge(s(n''), s(n'')), n', n', cons(s(x_1), 0))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if1'(ge(n'', n''), n', n', cons(s(x_1), 0))=true ---------------------------------------- (48) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0].if1'(ge(n'', n''), n', n', cons(s(x_1), 0))=true ---------------------------------------- (49) YES ---------------------------------------- (50) Obligation: Formula: n:sort[a0],x_1:sort[a0],x_1':sort[a0].if1'(ge(n, n), s(n), s(n), cons(s(x_1), s(x_1')))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (51) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0],x_1:sort[a0],x_1':sort[a0].if1'(ge(n, n), n', n', cons(s(x_1), s(x_1')))=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (52) Obligation: Formula: n:sort[a0],n':sort[a0],x_1:sort[a0],x_1':sort[a0].if1'(ge(n, n), n', n', cons(s(x_1), s(x_1')))=true Hypotheses: n:sort[a0],!x1':sort[a0],!x2:sort[a0].if1'(ge(n, n), n, n, cons(x1', x2))=true ---------------------------------------- (53) Induction by data structure (SOUND) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: n':sort[a0],x_1:sort[a0],x_1':sort[a0].if1'(ge(0, 0), n', n', cons(s(x_1), s(x_1')))=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0],x_1':sort[a0].if1'(ge(s(n''), s(n'')), n', n', cons(s(x_1), s(x_1')))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0],!x_1':sort[a0].if1'(ge(n'', n''), n', n', cons(s(x_1), s(x_1')))=true ---------------------------------------- (54) Complex Obligation (AND) ---------------------------------------- (55) Obligation: Formula: n':sort[a0],x_1:sort[a0],x_1':sort[a0].if1'(ge(0, 0), n', n', cons(s(x_1), s(x_1')))=true There are no hypotheses. ---------------------------------------- (56) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (57) YES ---------------------------------------- (58) Obligation: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0],x_1':sort[a0].if1'(ge(s(n''), s(n'')), n', n', cons(s(x_1), s(x_1')))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0],!x_1':sort[a0].if1'(ge(n'', n''), n', n', cons(s(x_1), s(x_1')))=true ---------------------------------------- (59) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0],!x_1':sort[a0].if1'(ge(n'', n''), n', n', cons(s(x_1), s(x_1')))=true ---------------------------------------- (60) YES
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
ge(x, 0) → true
ge(s(x), s(y)) → ge(x, y)
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) → cons(x, filterlow(n, xs))
filterlow(n, nil) → nil
ge(0, s(x)) → false
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
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) → cons(x, filterhigh(n, xs))
filterhigh(n, nil) → nil
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))
half(0)
half(s(0))
half(s(s(x0)))
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
ge(x, 0) → true
ge(s(x), s(y)) → ge(x, y)
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
ge(0, s(x)) → false
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))
half(0)
half(s(0))
half(s(s(x0)))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
QS(x0, cons(x1, nil)) → QS(half(x0), if2(ge(x1, x1), x1, x1, nil))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
ge(x, 0) → true
ge(s(x), s(y)) → ge(x, y)
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
ge(0, s(x)) → false
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))
half(0)
half(s(0))
half(s(s(x0)))
POL(0) = 0
POL(QS(x1, x2)) = x1 + x2
POL(cons(x1, x2)) = 1 + x2
POL(false) = 0
POL(filterhigh(x1, x2)) = x2
POL(ge(x1, x2)) = 0
POL(half(x1)) = x1
POL(if2(x1, x2, x3, x4)) = 1 + x4
POL(nil) = 1
POL(s(x1)) = 0
POL(true) = 0
[x, x0, x1, x2, x3, n22, x43, xs16, n27, x51, x35, xs12, n32, n17, x11, x19, x27, y2, x66] 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[a19](0, 0) -> true equal_sort[a19](0, s(x0)) -> false equal_sort[a19](s(x0), 0) -> false equal_sort[a19](s(x0), s(x1)) -> equal_sort[a19](x0, x1) equal_sort[a6](cons(x0, x1), cons(x2, x3)) -> equal_sort[a6](x0, x2) and equal_sort[a6](x1, x3) equal_sort[a6](cons(x0, x1), nil) -> false equal_sort[a6](nil, cons(x0, x1)) -> false equal_sort[a6](nil, nil) -> true equal_sort[a41](witness_sort[a41], witness_sort[a41]) -> true if2'(true, n22, x43, xs16) -> true if2'(false, n27, x51, cons(x35, xs12)) -> if2'(ge(x35, n27), n27, x35, xs12) if2'(false, n27, x51, nil) -> false filterhigh'(n32, nil) -> false equal_bool(ge(x35, n17), true) -> true | filterhigh'(n17, cons(x35, xs12)) -> true equal_bool(ge(x35, n17), true) -> false | filterhigh'(n17, cons(x35, xs12)) -> filterhigh'(n17, xs12) half(0) -> 0 half(s(0)) -> 0 half(s(s(x11))) -> s(half(x11)) ge(x19, 0) -> true ge(s(x27), s(y2)) -> ge(x27, y2) ge(0, s(x66)) -> false filterhigh(n32, nil) -> nil equal_bool(ge(x35, n17), true) -> true | filterhigh(n17, cons(x35, xs12)) -> filterhigh(n17, xs12) equal_bool(ge(x35, n17), true) -> false | filterhigh(n17, cons(x35, xs12)) -> cons(x35, filterhigh(n17, xs12)) if2(true, n22, x43, cons(x35, xs12)) -> if2(ge(x35, n22), n22, x35, xs12) if2(true, n22, x43, nil) -> nil if2(false, n27, x51, cons(x35, xs12)) -> cons(x51, if2(ge(x35, n27), n27, x35, xs12)) if2(false, n27, x51, nil) -> cons(x51, nil)
proof of internal # AProVE Commit ID: 9a00b172b26c9abb2d4c4d5eaf341e919eb0fbf1 nowonder 20100222 unpublished dirty Partial correctness of the following Program [x, x0, x1, x2, x3, n22, x43, xs16, n27, x51, x35, xs12, n32, n17, x11, x19, x27, y2, x66] 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[a19](0, 0) -> true equal_sort[a19](0, s(x0)) -> false equal_sort[a19](s(x0), 0) -> false equal_sort[a19](s(x0), s(x1)) -> equal_sort[a19](x0, x1) equal_sort[a6](cons(x0, x1), cons(x2, x3)) -> equal_sort[a6](x0, x2) and equal_sort[a6](x1, x3) equal_sort[a6](cons(x0, x1), nil) -> false equal_sort[a6](nil, cons(x0, x1)) -> false equal_sort[a6](nil, nil) -> true equal_sort[a41](witness_sort[a41], witness_sort[a41]) -> true if2'(true, n22, x43, xs16) -> true if2'(false, n27, x51, cons(x35, xs12)) -> if2'(ge(x35, n27), n27, x35, xs12) if2'(false, n27, x51, nil) -> false filterhigh'(n32, nil) -> false equal_bool(ge(x35, n17), true) -> true | filterhigh'(n17, cons(x35, xs12)) -> true equal_bool(ge(x35, n17), true) -> false | filterhigh'(n17, cons(x35, xs12)) -> filterhigh'(n17, xs12) half(0) -> 0 half(s(0)) -> 0 half(s(s(x11))) -> s(half(x11)) ge(x19, 0) -> true ge(s(x27), s(y2)) -> ge(x27, y2) ge(0, s(x66)) -> false filterhigh(n32, nil) -> nil equal_bool(ge(x35, n17), true) -> true | filterhigh(n17, cons(x35, xs12)) -> filterhigh(n17, xs12) equal_bool(ge(x35, n17), true) -> false | filterhigh(n17, cons(x35, xs12)) -> cons(x35, filterhigh(n17, xs12)) if2(true, n22, x43, cons(x35, xs12)) -> if2(ge(x35, n22), n22, x35, xs12) if2(true, n22, x43, nil) -> nil if2(false, n27, x51, cons(x35, xs12)) -> cons(x51, if2(ge(x35, n27), n27, x35, xs12)) if2(false, n27, x51, nil) -> cons(x51, nil) using the following formula: x1:sort[a19].(false=true\/if2'(ge(x1, x1), x1, x1, nil)=true) could be successfully shown: (0) Formula (1) Symbolic evaluation [EQUIVALENT] (2) Formula (3) Induction by data structure [EQUIVALENT] (4) AND (5) Formula (6) Symbolic evaluation [EQUIVALENT] (7) YES (8) Formula (9) Symbolic evaluation [EQUIVALENT] (10) Formula (11) Hypothesis Lifting [EQUIVALENT] (12) Formula (13) Inverse Substitution [SOUND] (14) Formula (15) Inverse Substitution [SOUND] (16) Formula (17) Induction by data structure [EQUIVALENT] (18) AND (19) Formula (20) Symbolic evaluation [EQUIVALENT] (21) YES (22) Formula (23) Symbolic evaluation [EQUIVALENT] (24) YES ---------------------------------------- (0) Obligation: Formula: x1:sort[a19].(false=true\/if2'(ge(x1, x1), x1, x1, nil)=true) There are no hypotheses. ---------------------------------------- (1) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: x1:sort[a19].if2'(ge(x1, x1), x1, x1, nil)=true ---------------------------------------- (2) Obligation: Formula: x1:sort[a19].if2'(ge(x1, x1), x1, x1, nil)=true There are no hypotheses. ---------------------------------------- (3) Induction by data structure (EQUIVALENT) Induction by data structure sort[a19] generates the following cases: 1. Base Case: Formula: if2'(ge(0, 0), 0, 0, nil)=true There are no hypotheses. 1. Step Case: Formula: n:sort[a19].if2'(ge(s(n), s(n)), s(n), s(n), nil)=true Hypotheses: n:sort[a19].if2'(ge(n, n), n, n, nil)=true ---------------------------------------- (4) Complex Obligation (AND) ---------------------------------------- (5) Obligation: Formula: if2'(ge(0, 0), 0, 0, nil)=true There are no hypotheses. ---------------------------------------- (6) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (7) YES ---------------------------------------- (8) Obligation: Formula: n:sort[a19].if2'(ge(s(n), s(n)), s(n), s(n), nil)=true Hypotheses: n:sort[a19].if2'(ge(n, n), n, n, nil)=true ---------------------------------------- (9) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: n:sort[a19].if2'(ge(n, n), s(n), s(n), nil)=true ---------------------------------------- (10) Obligation: Formula: n:sort[a19].if2'(ge(n, n), s(n), s(n), nil)=true Hypotheses: n:sort[a19].if2'(ge(n, n), n, n, nil)=true ---------------------------------------- (11) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a19].(if2'(ge(n, n), n, n, nil)=true->if2'(ge(n, n), s(n), s(n), nil)=true) There are no hypotheses. ---------------------------------------- (12) Obligation: Formula: n:sort[a19].(if2'(ge(n, n), n, n, nil)=true->if2'(ge(n, n), s(n), s(n), nil)=true) There are no hypotheses. ---------------------------------------- (13) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n':bool,n:sort[a19].(if2'(n', n, n, nil)=true->if2'(n', s(n), s(n), nil)=true) Inverse substitution used: [ge(n, n)/n'] ---------------------------------------- (14) Obligation: Formula: n':bool,n:sort[a19].(if2'(n', n, n, nil)=true->if2'(n', s(n), s(n), nil)=true) There are no hypotheses. ---------------------------------------- (15) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n':bool,n:sort[a19],n'':sort[a19].(if2'(n', n, n, nil)=true->if2'(n', n'', n'', nil)=true) Inverse substitution used: [s(n)/n''] ---------------------------------------- (16) Obligation: Formula: n':bool,n:sort[a19],n'':sort[a19].(if2'(n', n, n, nil)=true->if2'(n', n'', n'', nil)=true) There are no hypotheses. ---------------------------------------- (17) Induction by data structure (EQUIVALENT) Induction by data structure bool generates the following cases: 1. Base Case: Formula: n:sort[a19],n'':sort[a19].(if2'(true, n, n, nil)=true->if2'(true, n'', n'', nil)=true) There are no hypotheses. 1. Base Case: Formula: n:sort[a19],n'':sort[a19].(if2'(false, n, n, nil)=true->if2'(false, n'', n'', nil)=true) There are no hypotheses. ---------------------------------------- (18) Complex Obligation (AND) ---------------------------------------- (19) Obligation: Formula: n:sort[a19],n'':sort[a19].(if2'(true, n, n, nil)=true->if2'(true, n'', n'', nil)=true) There are no hypotheses. ---------------------------------------- (20) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (21) YES ---------------------------------------- (22) Obligation: Formula: n:sort[a19],n'':sort[a19].(if2'(false, n, n, nil)=true->if2'(false, n'', n'', nil)=true) There are no hypotheses. ---------------------------------------- (23) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (24) YES
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
ge(x, 0) → true
ge(s(x), s(y)) → ge(x, y)
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
ge(0, s(x)) → false
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))
half(0)
half(s(0))
half(s(s(x0)))
filterhigh'(n17, cons(x35, xs12)) → if2'(ge(x35, n17), n17, x35, xs12)
if2'(true, n22, x43, xs16) → true
if2'(false, n27, x51, xs20) → filterhigh'(n27, xs20)
filterhigh'(n32, nil) → false
half(0) → 0
half(s(0)) → 0
half(s(s(x11))) → s(half(x11))
ge(x19, 0) → true
ge(s(x27), s(y2)) → ge(x27, y2)
filterhigh(n17, cons(x35, xs12)) → if2(ge(x35, n17), n17, x35, xs12)
if2(true, n22, x43, xs16) → filterhigh(n22, xs16)
if2(false, n27, x51, xs20) → cons(x51, filterhigh(n27, xs20))
filterhigh(n32, nil) → nil
ge(0, s(x66)) → false
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[a19](0, 0) → true
equal_sort[a19](0, s(x0)) → false
equal_sort[a19](s(x0), 0) → false
equal_sort[a19](s(x0), s(x1)) → equal_sort[a19](x0, x1)
equal_sort[a6](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a6](x0, x2), equal_sort[a6](x1, x3))
equal_sort[a6](cons(x0, x1), nil) → false
equal_sort[a6](nil, cons(x0, x1)) → false
equal_sort[a6](nil, nil) → true
equal_sort[a41](witness_sort[a41], witness_sort[a41]) → true
half1 > [false, nil, 0] > [filterhigh'2, if2'4, ge2, true, filterhigh2, if24] > cons2
half1 > s1 > equalsort[a19]2
not1 > [false, nil, 0] > [filterhigh'2, if2'4, ge2, true, filterhigh2, if24] > cons2
isatrue1 > [false, nil, 0] > [filterhigh'2, if2'4, ge2, true, filterhigh2, if24] > cons2
isafalse1 > [false, nil, 0] > [filterhigh'2, if2'4, ge2, true, filterhigh2, if24] > cons2
equalsort[a6]2 > [false, nil, 0] > [filterhigh'2, if2'4, ge2, true, filterhigh2, if24] > cons2
equalsort[a6]2 > and2
equalsort[a41]2 > [filterhigh'2, if2'4, ge2, true, filterhigh2, if24] > cons2
filterhigh'2: [2,1]
cons2: [1,2]
if2'4: [4,2,1,3]
ge2: [1,2]
true: multiset
false: multiset
nil: multiset
half1: multiset
0: multiset
s1: multiset
filterhigh2: [2,1]
if24: [4,2,1,3]
equalbool2: [2,1]
and2: multiset
or2: [2,1]
not1: multiset
isatrue1: multiset
isafalse1: multiset
equalsort[a19]2: [1,2]
equalsort[a6]2: [2,1]
equalsort[a41]2: [2,1]
witnesssort[a41]: multiset
filterhigh'(n17, cons(x35, xs12)) → if2'(ge(x35, n17), n17, x35, xs12)
if2'(true, n22, x43, xs16) → true
if2'(false, n27, x51, xs20) → filterhigh'(n27, xs20)
filterhigh'(n32, nil) → false
half(0) → 0
half(s(0)) → 0
half(s(s(x11))) → s(half(x11))
ge(x19, 0) → true
ge(s(x27), s(y2)) → ge(x27, y2)
filterhigh(n17, cons(x35, xs12)) → if2(ge(x35, n17), n17, x35, xs12)
if2(true, n22, x43, xs16) → filterhigh(n22, xs16)
if2(false, n27, x51, xs20) → cons(x51, filterhigh(n27, xs20))
filterhigh(n32, nil) → nil
ge(0, s(x66)) → false
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[a19](0, 0) → true
equal_sort[a19](0, s(x0)) → false
equal_sort[a19](s(x0), 0) → false
equal_sort[a19](s(x0), s(x1)) → equal_sort[a19](x0, x1)
equal_sort[a6](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a6](x0, x2), equal_sort[a6](x1, x3))
equal_sort[a6](cons(x0, x1), nil) → false
equal_sort[a6](nil, cons(x0, x1)) → false
equal_sort[a6](nil, nil) → true
equal_sort[a41](witness_sort[a41], witness_sort[a41]) → true
if1'(true, n14, x20, xs10) → true
filterlow'(n23, cons(x31, xs17)) → if1'(ge(n23, x31), n23, x31, xs17)
if1'(false, n32, x42, xs24) → filterlow'(n32, xs24)
filterlow'(n41, nil) → false
ge(x, 0) → true
ge(s(x9), s(y')) → ge(x9, y')
if1(true, n14, x20, xs10) → filterlow(n14, xs10)
filterlow(n23, cons(x31, xs17)) → if1(ge(n23, x31), n23, x31, xs17)
if1(false, n32, x42, xs24) → cons(x42, filterlow(n32, xs24))
filterlow(n41, nil) → nil
ge(0, s(x63)) → false
half(0) → 0
half(s(0)) → 0
half(s(s(x94))) → s(half(x94))
if2(true, n82, x105, xs61) → filterhigh(n82, xs61)
filterhigh(n91, cons(x116, xs68)) → if2(ge(x116, n91), n91, x116, xs68)
if2(false, n100, x127, xs75) → cons(x127, filterhigh(n100, xs75))
filterhigh(n109, nil) → nil
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(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a5](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a5](x0, x2), equal_sort[a5](x1, x3))
equal_sort[a5](cons(x0, x1), nil) → false
equal_sort[a5](nil, cons(x0, x1)) → false
equal_sort[a5](nil, nil) → true
equal_sort[a62](witness_sort[a62], witness_sort[a62]) → true
[if1'4, filterlow'2] > [ge2, false, isatrue1] > [true, 0, witnesssort[a62]]
[if1'4, filterlow'2] > [ge2, false, isatrue1] > cons2
[if14, filterlow2] > [ge2, false, isatrue1] > [true, 0, witnesssort[a62]]
[if14, filterlow2] > [ge2, false, isatrue1] > cons2
half1 > [true, 0, witnesssort[a62]]
[if24, filterhigh2] > nil > [ge2, false, isatrue1] > [true, 0, witnesssort[a62]]
[if24, filterhigh2] > nil > [ge2, false, isatrue1] > cons2
or2 > [true, 0, witnesssort[a62]]
not1 > [ge2, false, isatrue1] > [true, 0, witnesssort[a62]]
not1 > [ge2, false, isatrue1] > cons2
isafalse1 > [ge2, false, isatrue1] > [true, 0, witnesssort[a62]]
isafalse1 > [ge2, false, isatrue1] > cons2
equalsort[a0]2 > [ge2, false, isatrue1] > [true, 0, witnesssort[a62]]
equalsort[a0]2 > [ge2, false, isatrue1] > cons2
equalsort[a5]2 > and2 > [ge2, false, isatrue1] > [true, 0, witnesssort[a62]]
equalsort[a5]2 > and2 > [ge2, false, isatrue1] > cons2
equalsort[a62]2 > [true, 0, witnesssort[a62]]
if1'4: [2,4,3,1]
true: multiset
filterlow'2: [1,2]
cons2: [1,2]
ge2: multiset
false: multiset
nil: multiset
0: multiset
if14: [2,4,3,1]
filterlow2: [1,2]
half1: [1]
if24: [4,2,3,1]
filterhigh2: [2,1]
equalbool2: multiset
and2: [2,1]
or2: [1,2]
not1: multiset
isatrue1: multiset
isafalse1: multiset
equalsort[a0]2: [1,2]
equalsort[a5]2: [2,1]
equalsort[a62]2: multiset
witnesssort[a62]: multiset
if1'(true, n14, x20, xs10) → true
filterlow'(n23, cons(x31, xs17)) → if1'(ge(n23, x31), n23, x31, xs17)
if1'(false, n32, x42, xs24) → filterlow'(n32, xs24)
filterlow'(n41, nil) → false
ge(x, 0) → true
if1(true, n14, x20, xs10) → filterlow(n14, xs10)
filterlow(n23, cons(x31, xs17)) → if1(ge(n23, x31), n23, x31, xs17)
if1(false, n32, x42, xs24) → cons(x42, filterlow(n32, xs24))
filterlow(n41, nil) → nil
ge(0, s(x63)) → false
half(0) → 0
half(s(0)) → 0
if2(true, n82, x105, xs61) → filterhigh(n82, xs61)
filterhigh(n91, cons(x116, xs68)) → if2(ge(x116, n91), n91, x116, xs68)
if2(false, n100, x127, xs75) → cons(x127, filterhigh(n100, xs75))
filterhigh(n109, nil) → nil
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(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a5](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a5](x0, x2), equal_sort[a5](x1, x3))
equal_sort[a5](cons(x0, x1), nil) → false
equal_sort[a5](nil, cons(x0, x1)) → false
equal_sort[a5](nil, nil) → true
equal_sort[a62](witness_sort[a62], witness_sort[a62]) → true
ge(s(x9), s(y')) → ge(x9, y')
half(s(s(x94))) → s(half(x94))
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
POL(equal_sort[a0](x1, x2)) = x1 + x2
POL(ge(x1, x2)) = 2·x1 + x2
POL(half(x1)) = 2 + 2·x1
POL(s(x1)) = 1 + 2·x1
ge(s(x9), s(y')) → ge(x9, y')
half(s(s(x94))) → s(half(x94))
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
if1'(true, n14, x20, xs10) → true
filterlow'(n23, cons(x31, xs17)) → if1'(ge(n23, x31), n23, x31, xs17)
if1'(false, n32, x42, xs24) → filterlow'(n32, xs24)
filterlow'(n41, nil) → false
ge(x, 0) → true
ge(s(x9), s(y')) → ge(x9, y')
if1(true, n14, x20, xs10) → filterlow(n14, xs10)
filterlow(n23, cons(x31, xs17)) → if1(ge(n23, x31), n23, x31, xs17)
if1(false, n32, x42, xs24) → cons(x42, filterlow(n32, xs24))
filterlow(n41, nil) → nil
ge(0, s(x63)) → false
half(0) → 0
half(s(0)) → 0
half(s(s(x94))) → s(half(x94))
if2(true, n82, x105, xs61) → filterhigh(n82, xs61)
filterhigh(n91, cons(x116, xs68)) → if2(ge(x116, n91), n91, x116, xs68)
if2(false, n100, x127, xs75) → cons(x127, filterhigh(n100, xs75))
filterhigh(n109, nil) → nil
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(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a5](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a5](x0, x2), equal_sort[a5](x1, x3))
equal_sort[a5](cons(x0, x1), nil) → false
equal_sort[a5](nil, cons(x0, x1)) → false
equal_sort[a5](nil, nil) → true
equal_sort[a64](witness_sort[a64], witness_sort[a64]) → true
[if1'4, filterlow'2] > [ge2, false, isatrue1] > [true, 0, witnesssort[a64]]
[if1'4, filterlow'2] > [ge2, false, isatrue1] > cons2
[if14, filterlow2] > [ge2, false, isatrue1] > [true, 0, witnesssort[a64]]
[if14, filterlow2] > [ge2, false, isatrue1] > cons2
half1 > [true, 0, witnesssort[a64]]
[if24, filterhigh2] > nil > [ge2, false, isatrue1] > [true, 0, witnesssort[a64]]
[if24, filterhigh2] > nil > [ge2, false, isatrue1] > cons2
or2 > [true, 0, witnesssort[a64]]
not1 > [ge2, false, isatrue1] > [true, 0, witnesssort[a64]]
not1 > [ge2, false, isatrue1] > cons2
isafalse1 > [ge2, false, isatrue1] > [true, 0, witnesssort[a64]]
isafalse1 > [ge2, false, isatrue1] > cons2
equalsort[a0]2 > [ge2, false, isatrue1] > [true, 0, witnesssort[a64]]
equalsort[a0]2 > [ge2, false, isatrue1] > cons2
equalsort[a5]2 > and2 > [ge2, false, isatrue1] > [true, 0, witnesssort[a64]]
equalsort[a5]2 > and2 > [ge2, false, isatrue1] > cons2
equalsort[a64]2 > [true, 0, witnesssort[a64]]
if1'4: [2,4,3,1]
true: multiset
filterlow'2: [1,2]
cons2: [1,2]
ge2: multiset
false: multiset
nil: multiset
0: multiset
if14: [2,4,3,1]
filterlow2: [1,2]
half1: [1]
if24: [4,2,3,1]
filterhigh2: [2,1]
equalbool2: multiset
and2: [2,1]
or2: [1,2]
not1: multiset
isatrue1: multiset
isafalse1: multiset
equalsort[a0]2: [1,2]
equalsort[a5]2: [2,1]
equalsort[a64]2: multiset
witnesssort[a64]: multiset
if1'(true, n14, x20, xs10) → true
filterlow'(n23, cons(x31, xs17)) → if1'(ge(n23, x31), n23, x31, xs17)
if1'(false, n32, x42, xs24) → filterlow'(n32, xs24)
filterlow'(n41, nil) → false
ge(x, 0) → true
if1(true, n14, x20, xs10) → filterlow(n14, xs10)
filterlow(n23, cons(x31, xs17)) → if1(ge(n23, x31), n23, x31, xs17)
if1(false, n32, x42, xs24) → cons(x42, filterlow(n32, xs24))
filterlow(n41, nil) → nil
ge(0, s(x63)) → false
half(0) → 0
half(s(0)) → 0
if2(true, n82, x105, xs61) → filterhigh(n82, xs61)
filterhigh(n91, cons(x116, xs68)) → if2(ge(x116, n91), n91, x116, xs68)
if2(false, n100, x127, xs75) → cons(x127, filterhigh(n100, xs75))
filterhigh(n109, nil) → nil
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(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a5](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a5](x0, x2), equal_sort[a5](x1, x3))
equal_sort[a5](cons(x0, x1), nil) → false
equal_sort[a5](nil, cons(x0, x1)) → false
equal_sort[a5](nil, nil) → true
equal_sort[a64](witness_sort[a64], witness_sort[a64]) → true
ge(s(x9), s(y')) → ge(x9, y')
half(s(s(x94))) → s(half(x94))
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
POL(equal_sort[a0](x1, x2)) = x1 + x2
POL(ge(x1, x2)) = 2·x1 + x2
POL(half(x1)) = 2 + 2·x1
POL(s(x1)) = 1 + 2·x1
ge(s(x9), s(y')) → ge(x9, y')
half(s(s(x94))) → s(half(x94))
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
if2'(true, n82, x105, xs61) → true
filterhigh'(n91, cons(x116, xs68)) → if2'(ge(x116, n91), n91, x116, xs68)
if2'(false, n100, x127, xs75) → filterhigh'(n100, xs75)
filterhigh'(n109, nil) → false
ge(x, 0) → true
ge(s(x9), s(y')) → ge(x9, y')
if1(true, n14, x20, xs10) → filterlow(n14, xs10)
filterlow(n23, cons(x31, xs17)) → if1(ge(n23, x31), n23, x31, xs17)
if1(false, n32, x42, xs24) → cons(x42, filterlow(n32, xs24))
filterlow(n41, nil) → nil
ge(0, s(x63)) → false
half(0) → 0
half(s(0)) → 0
half(s(s(x94))) → s(half(x94))
if2(true, n82, x105, xs61) → filterhigh(n82, xs61)
filterhigh(n91, cons(x116, xs68)) → if2(ge(x116, n91), n91, x116, xs68)
if2(false, n100, x127, xs75) → cons(x127, filterhigh(n100, xs75))
filterhigh(n109, nil) → nil
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(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a5](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a5](x0, x2), equal_sort[a5](x1, x3))
equal_sort[a5](cons(x0, x1), nil) → false
equal_sort[a5](nil, cons(x0, x1)) → false
equal_sort[a5](nil, nil) → true
equal_sort[a67](witness_sort[a67], witness_sort[a67]) → true
nil > [true, false, equalsort[a0]2, equalsort[a5]2] > [if2'4, filterhigh'2] > ge2
nil > [true, false, equalsort[a0]2, equalsort[a5]2] > [if14, filterlow2] > cons2
nil > [true, false, equalsort[a0]2, equalsort[a5]2] > [if14, filterlow2] > ge2
nil > [true, false, equalsort[a0]2, equalsort[a5]2] > and2
0 > [true, false, equalsort[a0]2, equalsort[a5]2] > [if2'4, filterhigh'2] > ge2
0 > [true, false, equalsort[a0]2, equalsort[a5]2] > [if14, filterlow2] > cons2
0 > [true, false, equalsort[a0]2, equalsort[a5]2] > [if14, filterlow2] > ge2
0 > [true, false, equalsort[a0]2, equalsort[a5]2] > and2
[if24, filterhigh2] > cons2
[if24, filterhigh2] > ge2
equalbool2 > [true, false, equalsort[a0]2, equalsort[a5]2] > [if2'4, filterhigh'2] > ge2
equalbool2 > [true, false, equalsort[a0]2, equalsort[a5]2] > [if14, filterlow2] > cons2
equalbool2 > [true, false, equalsort[a0]2, equalsort[a5]2] > [if14, filterlow2] > ge2
equalbool2 > [true, false, equalsort[a0]2, equalsort[a5]2] > and2
or2 > [true, false, equalsort[a0]2, equalsort[a5]2] > [if2'4, filterhigh'2] > ge2
or2 > [true, false, equalsort[a0]2, equalsort[a5]2] > [if14, filterlow2] > cons2
or2 > [true, false, equalsort[a0]2, equalsort[a5]2] > [if14, filterlow2] > ge2
or2 > [true, false, equalsort[a0]2, equalsort[a5]2] > and2
witnesssort[a67] > [true, false, equalsort[a0]2, equalsort[a5]2] > [if2'4, filterhigh'2] > ge2
witnesssort[a67] > [true, false, equalsort[a0]2, equalsort[a5]2] > [if14, filterlow2] > cons2
witnesssort[a67] > [true, false, equalsort[a0]2, equalsort[a5]2] > [if14, filterlow2] > ge2
witnesssort[a67] > [true, false, equalsort[a0]2, equalsort[a5]2] > and2
if2'4: [4,2,3,1]
true: multiset
filterhigh'2: [2,1]
cons2: [2,1]
ge2: multiset
false: multiset
nil: multiset
0: multiset
s1: [1]
if14: [2,4,1,3]
filterlow2: [1,2]
if24: [2,4,3,1]
filterhigh2: [1,2]
equalbool2: [2,1]
and2: [2,1]
or2: [2,1]
not1: [1]
equalsort[a0]2: [1,2]
equalsort[a5]2: [1,2]
equalsort[a67]2: [2,1]
witnesssort[a67]: multiset
if2'(true, n82, x105, xs61) → true
filterhigh'(n91, cons(x116, xs68)) → if2'(ge(x116, n91), n91, x116, xs68)
if2'(false, n100, x127, xs75) → filterhigh'(n100, xs75)
filterhigh'(n109, nil) → false
ge(x, 0) → true
ge(s(x9), s(y')) → ge(x9, y')
if1(true, n14, x20, xs10) → filterlow(n14, xs10)
filterlow(n23, cons(x31, xs17)) → if1(ge(n23, x31), n23, x31, xs17)
if1(false, n32, x42, xs24) → cons(x42, filterlow(n32, xs24))
filterlow(n41, nil) → nil
ge(0, s(x63)) → false
half(s(0)) → 0
half(s(s(x94))) → s(half(x94))
if2(true, n82, x105, xs61) → filterhigh(n82, xs61)
filterhigh(n91, cons(x116, xs68)) → if2(ge(x116, n91), n91, x116, xs68)
if2(false, n100, x127, xs75) → cons(x127, filterhigh(n100, xs75))
filterhigh(n109, nil) → nil
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
equal_sort[a0](0, 0) → true
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a5](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a5](x0, x2), equal_sort[a5](x1, x3))
equal_sort[a5](cons(x0, x1), nil) → false
equal_sort[a5](nil, cons(x0, x1)) → false
equal_sort[a5](nil, nil) → true
equal_sort[a67](witness_sort[a67], witness_sort[a67]) → true
half(0) → 0
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
POL(0) = 1
POL(false) = 2
POL(half(x1)) = 2 + 2·x1
POL(isa_false(x1)) = 2 + 2·x1
POL(isa_true(x1)) = 1 + 2·x1
POL(true) = 1
half(0) → 0
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true