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 Induction-Processor (⇐)
↳48 AND
↳49 QDP
↳50 UsableRulesProof (⇔)
↳51 QDP
↳52 QReductionProof (⇔)
↳53 QDP
↳54 Induction-Processor (⇐)
↳55 AND
↳56 QDP
↳57 PisEmptyProof (⇔)
↳58 YES
↳59 QTRS
↳60 QTRSRRRProof (⇔)
↳61 QTRS
↳62 QTRSRRRProof (⇔)
↳63 QTRS
↳64 RisEmptyProof (⇔)
↳65 YES
↳66 QTRS
↳67 QTRSRRRProof (⇔)
↳68 QTRS
↳69 QTRSRRRProof (⇔)
↳70 QTRS
↳71 RisEmptyProof (⇔)
↳72 YES
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
QSORT(cons(x, xs)) → APPEND(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs)))))
QSORT(cons(x, xs)) → QSORT(filterlow(last(cons(x, xs)), cons(x, xs)))
QSORT(cons(x, xs)) → FILTERLOW(last(cons(x, xs)), cons(x, xs))
QSORT(cons(x, xs)) → LAST(cons(x, xs))
QSORT(cons(x, xs)) → QSORT(filterhigh(last(cons(x, xs)), cons(x, xs)))
QSORT(cons(x, xs)) → FILTERHIGH(last(cons(x, xs)), cons(x, xs))
FILTERLOW(n, cons(x, xs)) → IF1(ge(n, x), n, x, xs)
FILTERLOW(n, cons(x, xs)) → GE(n, x)
IF1(true, n, x, xs) → FILTERLOW(n, xs)
IF1(false, n, x, xs) → FILTERLOW(n, xs)
FILTERHIGH(n, cons(x, xs)) → IF2(ge(x, n), n, x, xs)
FILTERHIGH(n, cons(x, xs)) → GE(x, n)
IF2(true, n, x, xs) → FILTERHIGH(n, xs)
IF2(false, n, x, xs) → FILTERHIGH(n, xs)
GE(s(x), s(y)) → GE(x, y)
APPEND(cons(x, xs), ys) → APPEND(xs, ys)
LAST(cons(x, cons(y, xs))) → LAST(cons(y, xs))
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
LAST(cons(x, cons(y, xs))) → LAST(cons(y, xs))
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
LAST(cons(x, cons(y, xs))) → LAST(cons(y, xs))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
LAST(cons(x, cons(y, xs))) → LAST(cons(y, xs))
From the DPs we obtained the following set of size-change graphs:
APPEND(cons(x, xs), ys) → APPEND(xs, ys)
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
APPEND(cons(x, xs), ys) → APPEND(xs, ys)
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
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(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
GE(s(x), s(y)) → GE(x, y)
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
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(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
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(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
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(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
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(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
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:
QSORT(cons(x, xs)) → QSORT(filterhigh(last(cons(x, xs)), cons(x, xs)))
QSORT(cons(x, xs)) → QSORT(filterlow(last(cons(x, xs)), cons(x, xs)))
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(last(cons(x, xs)), cons(x, xs))), cons(last(cons(x, xs)), qsort(filterhigh(last(cons(x, xs)), cons(x, xs)))))
filterlow(n, nil) → nil
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterhigh(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
append(nil, ys) → ys
append(cons(x, xs), ys) → cons(x, append(xs, ys))
last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
QSORT(cons(x, xs)) → QSORT(filterhigh(last(cons(x, xs)), cons(x, xs)))
QSORT(cons(x, xs)) → QSORT(filterlow(last(cons(x, xs)), cons(x, xs)))
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterlow(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
filterhigh(n, nil) → nil
qsort(nil)
qsort(cons(x0, x1))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
append(nil, ys)
append(cons(x0, x1), ys)
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
qsort(nil)
qsort(cons(x0, x1))
append(nil, ys)
append(cons(x0, x1), ys)
QSORT(cons(x, xs)) → QSORT(filterhigh(last(cons(x, xs)), cons(x, xs)))
QSORT(cons(x, xs)) → QSORT(filterlow(last(cons(x, xs)), cons(x, xs)))
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterlow(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
filterhigh(n, nil) → nil
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
POL(0) = 1
POL(QSORT(x1)) = x1
POL(cons(x1, x2)) = 1 + 2·x1 + x2
POL(false) = 1
POL(filterhigh(x1, x2)) = x2
POL(filterlow(x1, x2)) = x2
POL(ge(x1, x2)) = 1
POL(if1(x1, x2, x3, x4)) = 1 + 2·x3 + x4
POL(if2(x1, x2, x3, x4)) = x1 + 2·x3 + x4
POL(last(x1)) = x1
POL(nil) = 2
POL(s(x1)) = 0
POL(true) = 1
[x, x0, x1, x2, x3, n83, x117, xs73, n92, x129, x105, xs65, n101, n74, x10, y'', xs5, x46, x58, x70, y11, n65, n14, x22, xs13, n23, x34, n56, x82] 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[a36](cons(x0, x1), cons(x2, x3)) -> equal_sort[a36](x0, x2) and equal_sort[a36](x1, x3) equal_sort[a36](cons(x0, x1), nil) -> false equal_sort[a36](nil, cons(x0, x1)) -> false equal_sort[a36](nil, nil) -> true equal_sort[a62](witness_sort[a62], witness_sort[a62]) -> true if2'(true, n83, x117, xs73) -> true if2'(false, n92, x129, cons(x105, xs65)) -> if2'(ge(x105, n92), n92, x105, xs65) if2'(false, n92, x129, nil) -> false filterhigh'(n101, nil) -> false equal_bool(ge(x105, n74), true) -> true | filterhigh'(n74, cons(x105, xs65)) -> true equal_bool(ge(x105, n74), true) -> false | filterhigh'(n74, cons(x105, xs65)) -> filterhigh'(n74, xs65) last(cons(x, nil)) -> x last(cons(x10, cons(y'', xs5))) -> last(cons(y'', xs5)) last(nil) -> 0 ge(x46, 0) -> true ge(0, s(x58)) -> false ge(s(x70), s(y11)) -> ge(x70, y11) filterlow(n65, nil) -> nil equal_bool(ge(n14, x22), true) -> true | filterlow(n14, cons(x22, xs13)) -> filterlow(n14, xs13) equal_bool(ge(n14, x22), true) -> false | filterlow(n14, cons(x22, xs13)) -> cons(x22, filterlow(n14, xs13)) filterhigh(n101, nil) -> nil equal_bool(ge(x105, n74), true) -> true | filterhigh(n74, cons(x105, xs65)) -> filterhigh(n74, xs65) equal_bool(ge(x105, n74), true) -> false | filterhigh(n74, cons(x105, xs65)) -> cons(x105, filterhigh(n74, xs65)) if1(true, n23, x34, cons(x22, xs13)) -> if1(ge(n23, x22), n23, x22, xs13) if1(true, n23, x34, nil) -> nil if1(false, n56, x82, cons(x22, xs13)) -> cons(x82, if1(ge(n56, x22), n56, x22, xs13)) if1(false, n56, x82, nil) -> cons(x82, nil) if2(true, n83, x117, cons(x105, xs65)) -> if2(ge(x105, n83), n83, x105, xs65) if2(true, n83, x117, nil) -> nil if2(false, n92, x129, cons(x105, xs65)) -> cons(x129, if2(ge(x105, n92), n92, x105, xs65)) if2(false, n92, x129, nil) -> cons(x129, nil)
proof of internal # AProVE Commit ID: 9a00b172b26c9abb2d4c4d5eaf341e919eb0fbf1 nowonder 20100222 unpublished dirty Partial correctness of the following Program [x, x0, x1, x2, x3, n83, x117, xs73, n92, x129, x105, xs65, n101, n74, x10, y'', xs5, x46, x58, x70, y11, n65, n14, x22, xs13, n23, x34, n56, x82] 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[a36](cons(x0, x1), cons(x2, x3)) -> equal_sort[a36](x0, x2) and equal_sort[a36](x1, x3) equal_sort[a36](cons(x0, x1), nil) -> false equal_sort[a36](nil, cons(x0, x1)) -> false equal_sort[a36](nil, nil) -> true equal_sort[a62](witness_sort[a62], witness_sort[a62]) -> true if2'(true, n83, x117, xs73) -> true if2'(false, n92, x129, cons(x105, xs65)) -> if2'(ge(x105, n92), n92, x105, xs65) if2'(false, n92, x129, nil) -> false filterhigh'(n101, nil) -> false equal_bool(ge(x105, n74), true) -> true | filterhigh'(n74, cons(x105, xs65)) -> true equal_bool(ge(x105, n74), true) -> false | filterhigh'(n74, cons(x105, xs65)) -> filterhigh'(n74, xs65) last(cons(x, nil)) -> x last(cons(x10, cons(y'', xs5))) -> last(cons(y'', xs5)) last(nil) -> 0 ge(x46, 0) -> true ge(0, s(x58)) -> false ge(s(x70), s(y11)) -> ge(x70, y11) filterlow(n65, nil) -> nil equal_bool(ge(n14, x22), true) -> true | filterlow(n14, cons(x22, xs13)) -> filterlow(n14, xs13) equal_bool(ge(n14, x22), true) -> false | filterlow(n14, cons(x22, xs13)) -> cons(x22, filterlow(n14, xs13)) filterhigh(n101, nil) -> nil equal_bool(ge(x105, n74), true) -> true | filterhigh(n74, cons(x105, xs65)) -> filterhigh(n74, xs65) equal_bool(ge(x105, n74), true) -> false | filterhigh(n74, cons(x105, xs65)) -> cons(x105, filterhigh(n74, xs65)) if1(true, n23, x34, cons(x22, xs13)) -> if1(ge(n23, x22), n23, x22, xs13) if1(true, n23, x34, nil) -> nil if1(false, n56, x82, cons(x22, xs13)) -> cons(x82, if1(ge(n56, x22), n56, x22, xs13)) if1(false, n56, x82, nil) -> cons(x82, nil) if2(true, n83, x117, cons(x105, xs65)) -> if2(ge(x105, n83), n83, x105, xs65) if2(true, n83, x117, nil) -> nil if2(false, n92, x129, cons(x105, xs65)) -> cons(x129, if2(ge(x105, n92), n92, x105, xs65)) if2(false, n92, x129, nil) -> cons(x129, nil) using the following formula: z0:sort[a36].(~(z0=nil)->filterhigh'(last(z0), z0)=true) could be successfully shown: (0) Formula (1) Induction by algorithm [EQUIVALENT] (2) AND (3) Formula (4) Symbolic evaluation [EQUIVALENT] (5) Formula (6) Induction by data structure [EQUIVALENT] (7) AND (8) Formula (9) Symbolic evaluation [EQUIVALENT] (10) YES (11) Formula (12) Conditional Evaluation [EQUIVALENT] (13) AND (14) Formula (15) Symbolic evaluation [EQUIVALENT] (16) YES (17) Formula (18) Symbolic evaluation [EQUIVALENT] (19) Formula (20) Hypothesis Lifting [EQUIVALENT] (21) Formula (22) Symbolic evaluation under hypothesis [SOUND] (23) Formula (24) Hypothesis Lifting [EQUIVALENT] (25) Formula (26) Hypothesis Lifting [EQUIVALENT] (27) Formula (28) Conditional Evaluation [EQUIVALENT] (29) AND (30) Formula (31) Symbolic evaluation under hypothesis [EQUIVALENT] (32) YES (33) Formula (34) Symbolic evaluation [EQUIVALENT] (35) YES (36) Formula (37) Symbolic evaluation [EQUIVALENT] (38) YES (39) Formula (40) Symbolic evaluation [EQUIVALENT] (41) Formula (42) Conditional Evaluation [EQUIVALENT] (43) AND (44) Formula (45) Symbolic evaluation [EQUIVALENT] (46) YES (47) Formula (48) Symbolic evaluation under hypothesis [EQUIVALENT] (49) YES ---------------------------------------- (0) Obligation: Formula: z0:sort[a36].(~(z0=nil)->filterhigh'(last(z0), z0)=true) There are no hypotheses. ---------------------------------------- (1) Induction by algorithm (EQUIVALENT) Induction by algorithm last(z0) generates the following cases: 1. Base Case: Formula: x:sort[a0].(~(cons(x, nil)=nil)->filterhigh'(last(cons(x, nil)), cons(x, nil))=true) There are no hypotheses. 2. Base Case: Formula: (~(nil=nil)->filterhigh'(last(nil), nil)=true) There are no hypotheses. 1. Step Case: Formula: x10:sort[a0],y'':sort[a0],xs5:sort[a36].(~(cons(x10, cons(y'', xs5))=nil)->filterhigh'(last(cons(x10, cons(y'', xs5))), cons(x10, cons(y'', xs5)))=true) Hypotheses: y'':sort[a0],xs5:sort[a36].filterhigh'(last(cons(y'', xs5)), cons(y'', xs5))=true ---------------------------------------- (2) Complex Obligation (AND) ---------------------------------------- (3) Obligation: Formula: x:sort[a0].(~(cons(x, nil)=nil)->filterhigh'(last(cons(x, nil)), cons(x, nil))=true) There are no hypotheses. ---------------------------------------- (4) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: x:sort[a0].filterhigh'(x, cons(x, nil))=true ---------------------------------------- (5) Obligation: Formula: x:sort[a0].filterhigh'(x, cons(x, nil))=true There are no hypotheses. ---------------------------------------- (6) Induction by data structure (EQUIVALENT) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: filterhigh'(0, cons(0, nil))=true There are no hypotheses. 1. Step Case: Formula: n:sort[a0].filterhigh'(s(n), cons(s(n), nil))=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true ---------------------------------------- (7) Complex Obligation (AND) ---------------------------------------- (8) Obligation: Formula: filterhigh'(0, cons(0, nil))=true There are no hypotheses. ---------------------------------------- (9) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (10) YES ---------------------------------------- (11) Obligation: Formula: n:sort[a0].filterhigh'(s(n), cons(s(n), nil))=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true ---------------------------------------- (12) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: true=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=true Formula: n:sort[a0].filterhigh'(s(n), nil)=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (13) Complex Obligation (AND) ---------------------------------------- (14) Obligation: Formula: true=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=true ---------------------------------------- (15) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (16) YES ---------------------------------------- (17) Obligation: Formula: n:sort[a0].filterhigh'(s(n), nil)=true Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (18) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: False ---------------------------------------- (19) Obligation: Formula: False Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (20) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].((filterhigh'(n, cons(n, nil))=true/\equal_bool(ge(s(n), s(n)), true)=false)->False) Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (21) Obligation: Formula: n:sort[a0].((filterhigh'(n, cons(n, nil))=true/\equal_bool(ge(s(n), s(n)), true)=false)->False) Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (22) Symbolic evaluation under hypothesis (SOUND) Could be reduced by symbolic evaluation under hypothesis to: n:sort[a0].~(equal_bool(ge(n, n), true)=false) By using the following hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true ---------------------------------------- (23) Obligation: Formula: n:sort[a0].~(equal_bool(ge(n, n), true)=false) Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (24) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false)) Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true ---------------------------------------- (25) Obligation: Formula: n:sort[a0].(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false)) Hypotheses: n:sort[a0].filterhigh'(n, cons(n, nil))=true ---------------------------------------- (26) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].(filterhigh'(n, cons(n, nil))=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) There are no hypotheses. ---------------------------------------- (27) Obligation: Formula: n:sort[a0].(filterhigh'(n, cons(n, nil))=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) There are no hypotheses. ---------------------------------------- (28) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: n:sort[a0].(true=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) Hypotheses: n:sort[a0].equal_bool(ge(n, n), true)=true Formula: n:sort[a0].(filterhigh'(n, nil)=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) Hypotheses: n:sort[a0].equal_bool(ge(n, n), true)=false ---------------------------------------- (29) Complex Obligation (AND) ---------------------------------------- (30) Obligation: Formula: n:sort[a0].(true=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) Hypotheses: n:sort[a0].equal_bool(ge(n, n), true)=true ---------------------------------------- (31) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n:sort[a0].equal_bool(ge(n, n), true)=true ---------------------------------------- (32) YES ---------------------------------------- (33) Obligation: Formula: n:sort[a0].(filterhigh'(n, nil)=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) Hypotheses: n:sort[a0].equal_bool(ge(n, n), true)=false ---------------------------------------- (34) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (35) YES ---------------------------------------- (36) Obligation: Formula: (~(nil=nil)->filterhigh'(last(nil), nil)=true) There are no hypotheses. ---------------------------------------- (37) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (38) YES ---------------------------------------- (39) Obligation: Formula: x10:sort[a0],y'':sort[a0],xs5:sort[a36].(~(cons(x10, cons(y'', xs5))=nil)->filterhigh'(last(cons(x10, cons(y'', xs5))), cons(x10, cons(y'', xs5)))=true) Hypotheses: y'':sort[a0],xs5:sort[a36].filterhigh'(last(cons(y'', xs5)), cons(y'', xs5))=true ---------------------------------------- (40) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: y'':sort[a0],xs5:sort[a36],x10:sort[a0].filterhigh'(last(cons(y'', xs5)), cons(x10, cons(y'', xs5)))=true ---------------------------------------- (41) Obligation: Formula: y'':sort[a0],xs5:sort[a36],x10:sort[a0].filterhigh'(last(cons(y'', xs5)), cons(x10, cons(y'', xs5)))=true Hypotheses: y'':sort[a0],xs5:sort[a36].filterhigh'(last(cons(y'', xs5)), cons(y'', xs5))=true ---------------------------------------- (42) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: true=true Hypotheses: y'':sort[a0],xs5:sort[a36].filterhigh'(last(cons(y'', xs5)), cons(y'', xs5))=true x10:sort[a0],y'':sort[a0],xs5:sort[a36].equal_bool(ge(x10, last(cons(y'', xs5))), true)=true Formula: y'':sort[a0],xs5:sort[a36].filterhigh'(last(cons(y'', xs5)), cons(y'', xs5))=true Hypotheses: y'':sort[a0],xs5:sort[a36].filterhigh'(last(cons(y'', xs5)), cons(y'', xs5))=true x10:sort[a0],y'':sort[a0],xs5:sort[a36].equal_bool(ge(x10, last(cons(y'', xs5))), true)=false ---------------------------------------- (43) Complex Obligation (AND) ---------------------------------------- (44) Obligation: Formula: true=true Hypotheses: y'':sort[a0],xs5:sort[a36].filterhigh'(last(cons(y'', xs5)), cons(y'', xs5))=true x10:sort[a0],y'':sort[a0],xs5:sort[a36].equal_bool(ge(x10, last(cons(y'', xs5))), true)=true ---------------------------------------- (45) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (46) YES ---------------------------------------- (47) Obligation: Formula: y'':sort[a0],xs5:sort[a36].filterhigh'(last(cons(y'', xs5)), cons(y'', xs5))=true Hypotheses: y'':sort[a0],xs5:sort[a36].filterhigh'(last(cons(y'', xs5)), cons(y'', xs5))=true x10:sort[a0],y'':sort[a0],xs5:sort[a36].equal_bool(ge(x10, last(cons(y'', xs5))), true)=false ---------------------------------------- (48) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: y'':sort[a0],xs5:sort[a36].filterhigh'(last(cons(y'', xs5)), cons(y'', xs5))=true ---------------------------------------- (49) YES
QSORT(cons(x, xs)) → QSORT(filterlow(last(cons(x, xs)), cons(x, xs)))
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
if1(true, n, x, xs) → filterlow(n, xs)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterlow(n, nil) → nil
filterhigh(n, cons(x, xs)) → if2(ge(x, n), n, x, xs)
if2(true, n, x, xs) → filterhigh(n, xs)
if2(false, n, x, xs) → cons(x, filterhigh(n, xs))
filterhigh(n, nil) → nil
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
QSORT(cons(x, xs)) → QSORT(filterlow(last(cons(x, xs)), cons(x, xs)))
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
if1(true, n, x, xs) → filterlow(n, xs)
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
filterlow(n, nil) → nil
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
QSORT(cons(x, xs)) → QSORT(filterlow(last(cons(x, xs)), cons(x, xs)))
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
if1(true, n, x, xs) → filterlow(n, xs)
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
filterlow(n, nil) → nil
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
POL(0) = 0
POL(QSORT(x1)) = 2·x1
POL(cons(x1, x2)) = 2 + x1 + 2·x2
POL(false) = 0
POL(filterlow(x1, x2)) = x2
POL(ge(x1, x2)) = 3·x1
POL(if1(x1, x2, x3, x4)) = 2 + x3 + 2·x4
POL(last(x1)) = 2·x1
POL(nil) = 1
POL(s(x1)) = 3·x1
POL(true) = 0
[x, x0, x1, x2, x3, n5, x15, xs6, n32, x68, x24, xs11, n15, n10, x6, y'', xs1, x41, x50, x59, y13] 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[a24](cons(x0, x1), cons(x2, x3)) -> equal_sort[a24](x0, x2) and equal_sort[a24](x1, x3) equal_sort[a24](cons(x0, x1), nil) -> false equal_sort[a24](nil, cons(x0, x1)) -> false equal_sort[a24](nil, nil) -> true equal_sort[a42](witness_sort[a42], witness_sort[a42]) -> true if1'(true, n5, x15, xs6) -> true if1'(false, n32, x68, cons(x24, xs11)) -> if1'(ge(n32, x24), n32, x24, xs11) if1'(false, n32, x68, nil) -> false filterlow'(n15, nil) -> false equal_bool(ge(n10, x24), true) -> true | filterlow'(n10, cons(x24, xs11)) -> true equal_bool(ge(n10, x24), true) -> false | filterlow'(n10, cons(x24, xs11)) -> filterlow'(n10, xs11) last(cons(x, nil)) -> x last(cons(x6, cons(y'', xs1))) -> last(cons(y'', xs1)) last(nil) -> 0 filterlow(n15, nil) -> nil equal_bool(ge(n10, x24), true) -> true | filterlow(n10, cons(x24, xs11)) -> filterlow(n10, xs11) equal_bool(ge(n10, x24), true) -> false | filterlow(n10, cons(x24, xs11)) -> cons(x24, filterlow(n10, xs11)) ge(x41, 0) -> true ge(0, s(x50)) -> false ge(s(x59), s(y13)) -> ge(x59, y13) if1(true, n5, x15, cons(x24, xs11)) -> if1(ge(n5, x24), n5, x24, xs11) if1(true, n5, x15, nil) -> nil if1(false, n32, x68, cons(x24, xs11)) -> cons(x68, if1(ge(n32, x24), n32, x24, xs11)) if1(false, n32, x68, nil) -> cons(x68, nil)
proof of internal # AProVE Commit ID: 9a00b172b26c9abb2d4c4d5eaf341e919eb0fbf1 nowonder 20100222 unpublished dirty Partial correctness of the following Program [x, x0, x1, x2, x3, n5, x15, xs6, n32, x68, x24, xs11, n15, n10, x6, y'', xs1, x41, x50, x59, y13] 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[a24](cons(x0, x1), cons(x2, x3)) -> equal_sort[a24](x0, x2) and equal_sort[a24](x1, x3) equal_sort[a24](cons(x0, x1), nil) -> false equal_sort[a24](nil, cons(x0, x1)) -> false equal_sort[a24](nil, nil) -> true equal_sort[a42](witness_sort[a42], witness_sort[a42]) -> true if1'(true, n5, x15, xs6) -> true if1'(false, n32, x68, cons(x24, xs11)) -> if1'(ge(n32, x24), n32, x24, xs11) if1'(false, n32, x68, nil) -> false filterlow'(n15, nil) -> false equal_bool(ge(n10, x24), true) -> true | filterlow'(n10, cons(x24, xs11)) -> true equal_bool(ge(n10, x24), true) -> false | filterlow'(n10, cons(x24, xs11)) -> filterlow'(n10, xs11) last(cons(x, nil)) -> x last(cons(x6, cons(y'', xs1))) -> last(cons(y'', xs1)) last(nil) -> 0 filterlow(n15, nil) -> nil equal_bool(ge(n10, x24), true) -> true | filterlow(n10, cons(x24, xs11)) -> filterlow(n10, xs11) equal_bool(ge(n10, x24), true) -> false | filterlow(n10, cons(x24, xs11)) -> cons(x24, filterlow(n10, xs11)) ge(x41, 0) -> true ge(0, s(x50)) -> false ge(s(x59), s(y13)) -> ge(x59, y13) if1(true, n5, x15, cons(x24, xs11)) -> if1(ge(n5, x24), n5, x24, xs11) if1(true, n5, x15, nil) -> nil if1(false, n32, x68, cons(x24, xs11)) -> cons(x68, if1(ge(n32, x24), n32, x24, xs11)) if1(false, n32, x68, nil) -> cons(x68, nil) using the following formula: z0:sort[a24].(~(z0=nil)->filterlow'(last(z0), z0)=true) could be successfully shown: (0) Formula (1) Induction by algorithm [EQUIVALENT] (2) AND (3) Formula (4) Symbolic evaluation [EQUIVALENT] (5) Formula (6) Induction by data structure [EQUIVALENT] (7) AND (8) Formula (9) Symbolic evaluation [EQUIVALENT] (10) YES (11) Formula (12) Conditional Evaluation [EQUIVALENT] (13) AND (14) Formula (15) Symbolic evaluation [EQUIVALENT] (16) YES (17) Formula (18) Symbolic evaluation [EQUIVALENT] (19) Formula (20) Hypothesis Lifting [EQUIVALENT] (21) Formula (22) Symbolic evaluation under hypothesis [SOUND] (23) Formula (24) Hypothesis Lifting [EQUIVALENT] (25) Formula (26) Hypothesis Lifting [EQUIVALENT] (27) Formula (28) Conditional Evaluation [EQUIVALENT] (29) AND (30) Formula (31) Symbolic evaluation under hypothesis [EQUIVALENT] (32) YES (33) Formula (34) Symbolic evaluation [EQUIVALENT] (35) YES (36) Formula (37) Symbolic evaluation [EQUIVALENT] (38) YES (39) Formula (40) Symbolic evaluation [EQUIVALENT] (41) Formula (42) Conditional Evaluation [EQUIVALENT] (43) AND (44) Formula (45) Symbolic evaluation [EQUIVALENT] (46) YES (47) Formula (48) Symbolic evaluation under hypothesis [EQUIVALENT] (49) YES ---------------------------------------- (0) Obligation: Formula: z0:sort[a24].(~(z0=nil)->filterlow'(last(z0), z0)=true) There are no hypotheses. ---------------------------------------- (1) Induction by algorithm (EQUIVALENT) Induction by algorithm last(z0) generates the following cases: 1. Base Case: Formula: x:sort[a0].(~(cons(x, nil)=nil)->filterlow'(last(cons(x, nil)), cons(x, nil))=true) There are no hypotheses. 2. Base Case: Formula: (~(nil=nil)->filterlow'(last(nil), nil)=true) There are no hypotheses. 1. Step Case: Formula: x6:sort[a0],y'':sort[a0],xs1:sort[a24].(~(cons(x6, cons(y'', xs1))=nil)->filterlow'(last(cons(x6, cons(y'', xs1))), cons(x6, cons(y'', xs1)))=true) Hypotheses: y'':sort[a0],xs1:sort[a24].filterlow'(last(cons(y'', xs1)), cons(y'', xs1))=true ---------------------------------------- (2) Complex Obligation (AND) ---------------------------------------- (3) Obligation: Formula: x:sort[a0].(~(cons(x, nil)=nil)->filterlow'(last(cons(x, nil)), cons(x, nil))=true) There are no hypotheses. ---------------------------------------- (4) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: x:sort[a0].filterlow'(x, cons(x, nil))=true ---------------------------------------- (5) Obligation: Formula: x:sort[a0].filterlow'(x, cons(x, nil))=true There are no hypotheses. ---------------------------------------- (6) Induction by data structure (EQUIVALENT) Induction by data structure sort[a0] generates the following cases: 1. Base Case: Formula: filterlow'(0, cons(0, nil))=true There are no hypotheses. 1. Step Case: Formula: n:sort[a0].filterlow'(s(n), cons(s(n), nil))=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true ---------------------------------------- (7) Complex Obligation (AND) ---------------------------------------- (8) Obligation: Formula: filterlow'(0, cons(0, nil))=true There are no hypotheses. ---------------------------------------- (9) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (10) YES ---------------------------------------- (11) Obligation: Formula: n:sort[a0].filterlow'(s(n), cons(s(n), nil))=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true ---------------------------------------- (12) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: true=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=true Formula: n:sort[a0].filterlow'(s(n), nil)=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (13) Complex Obligation (AND) ---------------------------------------- (14) Obligation: Formula: true=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=true ---------------------------------------- (15) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (16) YES ---------------------------------------- (17) Obligation: Formula: n:sort[a0].filterlow'(s(n), nil)=true Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (18) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: False ---------------------------------------- (19) Obligation: Formula: False Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (20) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].((filterlow'(n, cons(n, nil))=true/\equal_bool(ge(s(n), s(n)), true)=false)->False) Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (21) Obligation: Formula: n:sort[a0].((filterlow'(n, cons(n, nil))=true/\equal_bool(ge(s(n), s(n)), true)=false)->False) Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (22) Symbolic evaluation under hypothesis (SOUND) Could be reduced by symbolic evaluation under hypothesis to: n:sort[a0].~(equal_bool(ge(n, n), true)=false) By using the following hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true ---------------------------------------- (23) Obligation: Formula: n:sort[a0].~(equal_bool(ge(n, n), true)=false) Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true n:sort[a0].equal_bool(ge(s(n), s(n)), true)=false ---------------------------------------- (24) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false)) Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true ---------------------------------------- (25) Obligation: Formula: n:sort[a0].(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false)) Hypotheses: n:sort[a0].filterlow'(n, cons(n, nil))=true ---------------------------------------- (26) Hypothesis Lifting (EQUIVALENT) Formula could be generalised by hypothesis lifting to the following new obligation: Formula: n:sort[a0].(filterlow'(n, cons(n, nil))=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) There are no hypotheses. ---------------------------------------- (27) Obligation: Formula: n:sort[a0].(filterlow'(n, cons(n, nil))=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) There are no hypotheses. ---------------------------------------- (28) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: n:sort[a0].(true=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) Hypotheses: n:sort[a0].equal_bool(ge(n, n), true)=true Formula: n:sort[a0].(filterlow'(n, nil)=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) Hypotheses: n:sort[a0].equal_bool(ge(n, n), true)=false ---------------------------------------- (29) Complex Obligation (AND) ---------------------------------------- (30) Obligation: Formula: n:sort[a0].(true=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) Hypotheses: n:sort[a0].equal_bool(ge(n, n), true)=true ---------------------------------------- (31) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: n:sort[a0].equal_bool(ge(n, n), true)=true ---------------------------------------- (32) YES ---------------------------------------- (33) Obligation: Formula: n:sort[a0].(filterlow'(n, nil)=true->(equal_bool(ge(n, n), true)=false->~(equal_bool(ge(n, n), true)=false))) Hypotheses: n:sort[a0].equal_bool(ge(n, n), true)=false ---------------------------------------- (34) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (35) YES ---------------------------------------- (36) Obligation: Formula: (~(nil=nil)->filterlow'(last(nil), nil)=true) There are no hypotheses. ---------------------------------------- (37) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (38) YES ---------------------------------------- (39) Obligation: Formula: x6:sort[a0],y'':sort[a0],xs1:sort[a24].(~(cons(x6, cons(y'', xs1))=nil)->filterlow'(last(cons(x6, cons(y'', xs1))), cons(x6, cons(y'', xs1)))=true) Hypotheses: y'':sort[a0],xs1:sort[a24].filterlow'(last(cons(y'', xs1)), cons(y'', xs1))=true ---------------------------------------- (40) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: y'':sort[a0],xs1:sort[a24],x6:sort[a0].filterlow'(last(cons(y'', xs1)), cons(x6, cons(y'', xs1)))=true ---------------------------------------- (41) Obligation: Formula: y'':sort[a0],xs1:sort[a24],x6:sort[a0].filterlow'(last(cons(y'', xs1)), cons(x6, cons(y'', xs1)))=true Hypotheses: y'':sort[a0],xs1:sort[a24].filterlow'(last(cons(y'', xs1)), cons(y'', xs1))=true ---------------------------------------- (42) Conditional Evaluation (EQUIVALENT) The formula could be reduced to the following new obligations by conditional evaluation: Formula: true=true Hypotheses: y'':sort[a0],xs1:sort[a24].filterlow'(last(cons(y'', xs1)), cons(y'', xs1))=true y'':sort[a0],xs1:sort[a24],x6:sort[a0].equal_bool(ge(last(cons(y'', xs1)), x6), true)=true Formula: y'':sort[a0],xs1:sort[a24].filterlow'(last(cons(y'', xs1)), cons(y'', xs1))=true Hypotheses: y'':sort[a0],xs1:sort[a24].filterlow'(last(cons(y'', xs1)), cons(y'', xs1))=true y'':sort[a0],xs1:sort[a24],x6:sort[a0].equal_bool(ge(last(cons(y'', xs1)), x6), true)=false ---------------------------------------- (43) Complex Obligation (AND) ---------------------------------------- (44) Obligation: Formula: true=true Hypotheses: y'':sort[a0],xs1:sort[a24].filterlow'(last(cons(y'', xs1)), cons(y'', xs1))=true y'':sort[a0],xs1:sort[a24],x6:sort[a0].equal_bool(ge(last(cons(y'', xs1)), x6), true)=true ---------------------------------------- (45) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (46) YES ---------------------------------------- (47) Obligation: Formula: y'':sort[a0],xs1:sort[a24].filterlow'(last(cons(y'', xs1)), cons(y'', xs1))=true Hypotheses: y'':sort[a0],xs1:sort[a24].filterlow'(last(cons(y'', xs1)), cons(y'', xs1))=true y'':sort[a0],xs1:sort[a24],x6:sort[a0].equal_bool(ge(last(cons(y'', xs1)), x6), true)=false ---------------------------------------- (48) Symbolic evaluation under hypothesis (EQUIVALENT) Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses: y'':sort[a0],xs1:sort[a24].filterlow'(last(cons(y'', xs1)), cons(y'', xs1))=true ---------------------------------------- (49) YES
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
if1(true, n, x, xs) → filterlow(n, xs)
filterlow(n, cons(x, xs)) → if1(ge(n, x), n, x, xs)
filterlow(n, nil) → nil
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if1(false, n, x, xs) → cons(x, filterlow(n, xs))
filterlow(x0, nil)
filterlow(x0, cons(x1, x2))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
if1'(true, n5, x15, xs6) → true
filterlow'(n10, cons(x24, xs11)) → if1'(ge(n10, x24), n10, x24, xs11)
filterlow'(n15, nil) → false
if1'(false, n32, x68, xs32) → filterlow'(n32, xs32)
last(cons(x, nil)) → x
last(cons(x6, cons(y'', xs1))) → last(cons(y'', xs1))
if1(true, n5, x15, xs6) → filterlow(n5, xs6)
filterlow(n10, cons(x24, xs11)) → if1(ge(n10, x24), n10, x24, xs11)
filterlow(n15, nil) → nil
ge(x41, 0) → true
ge(0, s(x50)) → false
ge(s(x59), s(y13)) → ge(x59, y13)
if1(false, n32, x68, xs32) → cons(x68, filterlow(n32, xs32))
last(nil) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a0](0, 0) → true
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a24](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a24](x0, x2), equal_sort[a24](x1, x3))
equal_sort[a24](cons(x0, x1), nil) → false
equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](nil, nil) → true
equal_sort[a42](witness_sort[a42], witness_sort[a42]) → true
nil > [true, false, 0] > [if14, filterlow2] > cons2 > [if1'4, filterlow'2, ge2]
equalbool2 > [if1'4, filterlow'2, ge2]
or2 > [if1'4, filterlow'2, ge2]
not1 > [if1'4, filterlow'2, ge2]
isatrue1 > [if1'4, filterlow'2, ge2]
isafalse1 > [if1'4, filterlow'2, ge2]
equalsort[a0]2 > [if1'4, filterlow'2, ge2]
equalsort[a24]2 > and2 > [if1'4, filterlow'2, ge2]
equalsort[a42]2 > [true, false, 0] > [if14, filterlow2] > cons2 > [if1'4, filterlow'2, ge2]
witnesssort[a42] > [if1'4, filterlow'2, ge2]
if1'4: [4,2,3,1]
true: multiset
filterlow'2: [2,1]
cons2: multiset
ge2: [2,1]
nil: multiset
false: multiset
if14: [4,2,1,3]
filterlow2: [2,1]
0: multiset
equalbool2: [2,1]
and2: [1,2]
or2: [1,2]
not1: [1]
isatrue1: [1]
isafalse1: multiset
equalsort[a0]2: [2,1]
equalsort[a24]2: multiset
equalsort[a42]2: [2,1]
witnesssort[a42]: multiset
if1'(true, n5, x15, xs6) → true
filterlow'(n10, cons(x24, xs11)) → if1'(ge(n10, x24), n10, x24, xs11)
filterlow'(n15, nil) → false
if1'(false, n32, x68, xs32) → filterlow'(n32, xs32)
last(cons(x, nil)) → x
last(cons(x6, cons(y'', xs1))) → last(cons(y'', xs1))
if1(true, n5, x15, xs6) → filterlow(n5, xs6)
filterlow(n10, cons(x24, xs11)) → if1(ge(n10, x24), n10, x24, xs11)
filterlow(n15, nil) → nil
ge(x41, 0) → true
ge(0, s(x50)) → false
if1(false, n32, x68, xs32) → cons(x68, filterlow(n32, xs32))
last(nil) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a0](0, 0) → true
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a24](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a24](x0, x2), equal_sort[a24](x1, x3))
equal_sort[a24](cons(x0, x1), nil) → false
equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](nil, nil) → true
equal_sort[a42](witness_sort[a42], witness_sort[a42]) → true
ge(s(x59), s(y13)) → ge(x59, y13)
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(s(x1)) = 1 + 2·x1
ge(s(x59), s(y13)) → ge(x59, y13)
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
filterhigh'(n74, cons(x105, xs65)) → if2'(ge(x105, n74), n74, x105, xs65)
if2'(true, n83, x117, xs73) → true
if2'(false, n92, x129, xs81) → filterhigh'(n92, xs81)
filterhigh'(n101, nil) → false
last(cons(x, nil)) → x
last(cons(x10, cons(y'', xs5))) → last(cons(y'', xs5))
filterlow(n14, cons(x22, xs13)) → if1(ge(n14, x22), n14, x22, xs13)
if1(true, n23, x34, xs21) → filterlow(n23, xs21)
ge(x46, 0) → true
ge(0, s(x58)) → false
ge(s(x70), s(y11)) → ge(x70, y11)
if1(false, n56, x82, xs50) → cons(x82, filterlow(n56, xs50))
filterlow(n65, nil) → nil
filterhigh(n74, cons(x105, xs65)) → if2(ge(x105, n74), n74, x105, xs65)
if2(true, n83, x117, xs73) → filterhigh(n83, xs73)
if2(false, n92, x129, xs81) → cons(x129, filterhigh(n92, xs81))
filterhigh(n101, nil) → nil
last(nil) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a0](0, 0) → true
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a36](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a36](x0, x2), equal_sort[a36](x1, x3))
equal_sort[a36](cons(x0, x1), nil) → false
equal_sort[a36](nil, cons(x0, x1)) → false
equal_sort[a36](nil, nil) → true
equal_sort[a62](witness_sort[a62], witness_sort[a62]) → true
[filterhigh'2, if2'4] > [ge2, true, equalsort[a36]2] > and2 > false
[last1, 0] > cons2 > false
[filterlow2, if14] > cons2 > false
[filterlow2, if14] > [ge2, true, equalsort[a36]2] > and2 > false
[filterlow2, if14] > nil > false
[filterhigh2, if24] > cons2 > false
[filterhigh2, if24] > [ge2, true, equalsort[a36]2] > and2 > false
[filterhigh2, if24] > nil > false
equalbool2 > [ge2, true, equalsort[a36]2] > and2 > false
or2 > [ge2, true, equalsort[a36]2] > and2 > false
not1 > [ge2, true, equalsort[a36]2] > and2 > false
isatrue1 > [ge2, true, equalsort[a36]2] > and2 > false
isafalse1 > [ge2, true, equalsort[a36]2] > and2 > false
equalsort[a0]2 > [ge2, true, equalsort[a36]2] > and2 > false
witnesssort[a62] > [ge2, true, equalsort[a36]2] > and2 > false
filterhigh'2: [2,1]
cons2: multiset
if2'4: [4,2,3,1]
ge2: [1,2]
true: multiset
false: multiset
nil: multiset
last1: multiset
filterlow2: [1,2]
if14: [2,4,3,1]
0: multiset
filterhigh2: [2,1]
if24: [4,2,1,3]
equalbool2: multiset
and2: [1,2]
or2: [2,1]
not1: [1]
isatrue1: multiset
isafalse1: [1]
equalsort[a0]2: [1,2]
equalsort[a36]2: [1,2]
equalsort[a62]2: multiset
witnesssort[a62]: multiset
filterhigh'(n74, cons(x105, xs65)) → if2'(ge(x105, n74), n74, x105, xs65)
if2'(true, n83, x117, xs73) → true
if2'(false, n92, x129, xs81) → filterhigh'(n92, xs81)
filterhigh'(n101, nil) → false
last(cons(x, nil)) → x
last(cons(x10, cons(y'', xs5))) → last(cons(y'', xs5))
filterlow(n14, cons(x22, xs13)) → if1(ge(n14, x22), n14, x22, xs13)
if1(true, n23, x34, xs21) → filterlow(n23, xs21)
ge(x46, 0) → true
ge(0, s(x58)) → false
if1(false, n56, x82, xs50) → cons(x82, filterlow(n56, xs50))
filterlow(n65, nil) → nil
filterhigh(n74, cons(x105, xs65)) → if2(ge(x105, n74), n74, x105, xs65)
if2(true, n83, x117, xs73) → filterhigh(n83, xs73)
if2(false, n92, x129, xs81) → cons(x129, filterhigh(n92, xs81))
filterhigh(n101, nil) → nil
last(nil) → 0
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a0](0, 0) → true
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a36](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a36](x0, x2), equal_sort[a36](x1, x3))
equal_sort[a36](cons(x0, x1), nil) → false
equal_sort[a36](nil, cons(x0, x1)) → false
equal_sort[a36](nil, nil) → true
equal_sort[a62](witness_sort[a62], witness_sort[a62]) → true
ge(s(x70), s(y11)) → ge(x70, y11)
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(s(x1)) = 1 + 2·x1
ge(s(x70), s(y11)) → ge(x70, y11)
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)