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 Rewriting (⇔)
↳41 QDP
↳42 Rewriting (⇔)
↳43 QDP
↳44 Induction-Processor (⇐)
↳45 AND
↳46 QDP
↳47 UsableRulesProof (⇔)
↳48 QDP
↳49 QReductionProof (⇔)
↳50 QDP
↳51 Induction-Processor (⇐)
↳52 AND
↳53 QDP
↳54 PisEmptyProof (⇔)
↳55 YES
↳56 QTRS
↳57 QTRSRRRProof (⇔)
↳58 QTRS
↳59 QTRSRRRProof (⇔)
↳60 QTRS
↳61 RisEmptyProof (⇔)
↳62 YES
↳63 QTRS
↳64 QTRSRRRProof (⇔)
↳65 QTRS
↳66 QTRSRRRProof (⇔)
↳67 QTRS
↳68 RisEmptyProof (⇔)
↳69 YES
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, 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))
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, 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))
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)
QSORT(cons(x, xs)) → APPEND(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, cons(x, xs)))))
QSORT(cons(x, xs)) → QSORT(filterlow(x, cons(x, xs)))
QSORT(cons(x, xs)) → FILTERLOW(x, cons(x, xs))
QSORT(cons(x, xs)) → QSORT(filterhigh(x, cons(x, xs)))
QSORT(cons(x, xs)) → FILTERHIGH(x, 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)
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, 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))
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)
APPEND(cons(x, xs), ys) → APPEND(xs, ys)
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, 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))
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)
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)
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)
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(x, cons(x, xs))), cons(x, qsort(filterhigh(x, 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))
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)
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)
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)
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(x, cons(x, xs))), cons(x, qsort(filterhigh(x, 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))
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)
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)
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)
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(x, cons(x, xs))), cons(x, qsort(filterhigh(x, 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))
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)
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)
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)
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(x, cons(x, xs)))
QSORT(cons(x, xs)) → QSORT(filterlow(x, cons(x, xs)))
qsort(nil) → nil
qsort(cons(x, xs)) → append(qsort(filterlow(x, cons(x, xs))), cons(x, qsort(filterhigh(x, 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))
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)
QSORT(cons(x, xs)) → QSORT(filterhigh(x, cons(x, xs)))
QSORT(cons(x, xs)) → QSORT(filterlow(x, cons(x, 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)
qsort(nil)
qsort(cons(x0, x1))
append(nil, ys)
append(cons(x0, x1), ys)
QSORT(cons(x, xs)) → QSORT(filterhigh(x, cons(x, xs)))
QSORT(cons(x, xs)) → QSORT(filterlow(x, cons(x, 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))
QSORT(cons(x, xs)) → QSORT(if2(ge(x, x), x, x, xs))
QSORT(cons(x, xs)) → QSORT(filterlow(x, cons(x, xs)))
QSORT(cons(x, xs)) → QSORT(if2(ge(x, x), x, x, 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))
QSORT(cons(x, xs)) → QSORT(if1(ge(x, x), x, x, xs))
QSORT(cons(x, xs)) → QSORT(if2(ge(x, x), x, x, xs))
QSORT(cons(x, xs)) → QSORT(if1(ge(x, x), x, x, 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))
POL(0) = 0
POL(QSORT(x1)) = x1
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(if1(x1, x2, x3, x4)) = 1 + x4
POL(if2(x1, x2, x3, x4)) = 1 + x4
POL(nil) = 0
POL(s(x1)) = 0
POL(true) = 0
[x, x0, x1, x2, x3, n65, x75, xs48, n74, x85, x65, xs41, n83, n56, x16, x26, x36, y2, n47, n4, x5, xs2, n, n38, x46] 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[a2](cons(x0, x1), cons(x2, x3)) -> equal_sort[a2](x0, x2) and equal_sort[a2](x1, x3) equal_sort[a2](cons(x0, x1), nil) -> false equal_sort[a2](nil, cons(x0, x1)) -> false equal_sort[a2](nil, nil) -> true equal_sort[a55](witness_sort[a55], witness_sort[a55]) -> true if2'(true, n65, x75, xs48) -> true if2'(false, n74, x85, cons(x65, xs41)) -> if2'(ge(x65, n74), n74, x65, xs41) if2'(false, n74, x85, nil) -> false filterhigh'(n83, nil) -> false equal_bool(ge(x65, n56), true) -> true | filterhigh'(n56, cons(x65, xs41)) -> true equal_bool(ge(x65, n56), true) -> false | filterhigh'(n56, cons(x65, xs41)) -> filterhigh'(n56, xs41) ge(x16, 0) -> true ge(0, s(x26)) -> false ge(s(x36), s(y2)) -> ge(x36, y2) filterlow(n47, nil) -> nil equal_bool(ge(n4, x5), true) -> true | filterlow(n4, cons(x5, xs2)) -> filterlow(n4, xs2) equal_bool(ge(n4, x5), true) -> false | filterlow(n4, cons(x5, xs2)) -> cons(x5, filterlow(n4, xs2)) filterhigh(n83, nil) -> nil equal_bool(ge(x65, n56), true) -> true | filterhigh(n56, cons(x65, xs41)) -> filterhigh(n56, xs41) equal_bool(ge(x65, n56), true) -> false | filterhigh(n56, cons(x65, xs41)) -> cons(x65, filterhigh(n56, xs41)) if1(true, n, x, cons(x5, xs2)) -> if1(ge(n, x5), n, x5, xs2) if1(true, n, x, nil) -> nil if1(false, n38, x46, cons(x5, xs2)) -> cons(x46, if1(ge(n38, x5), n38, x5, xs2)) if1(false, n38, x46, nil) -> cons(x46, nil) if2(true, n65, x75, cons(x65, xs41)) -> if2(ge(x65, n65), n65, x65, xs41) if2(true, n65, x75, nil) -> nil if2(false, n74, x85, cons(x65, xs41)) -> cons(x85, if2(ge(x65, n74), n74, x65, xs41)) if2(false, n74, x85, nil) -> cons(x85, nil)
proof of internal # AProVE Commit ID: 9a00b172b26c9abb2d4c4d5eaf341e919eb0fbf1 nowonder 20100222 unpublished dirty Partial correctness of the following Program [x, x0, x1, x2, x3, n65, x75, xs48, n74, x85, x65, xs41, n83, n56, x16, x26, x36, y2, n47, n4, x5, xs2, n, n38, x46] 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[a2](cons(x0, x1), cons(x2, x3)) -> equal_sort[a2](x0, x2) and equal_sort[a2](x1, x3) equal_sort[a2](cons(x0, x1), nil) -> false equal_sort[a2](nil, cons(x0, x1)) -> false equal_sort[a2](nil, nil) -> true equal_sort[a55](witness_sort[a55], witness_sort[a55]) -> true if2'(true, n65, x75, xs48) -> true if2'(false, n74, x85, cons(x65, xs41)) -> if2'(ge(x65, n74), n74, x65, xs41) if2'(false, n74, x85, nil) -> false filterhigh'(n83, nil) -> false equal_bool(ge(x65, n56), true) -> true | filterhigh'(n56, cons(x65, xs41)) -> true equal_bool(ge(x65, n56), true) -> false | filterhigh'(n56, cons(x65, xs41)) -> filterhigh'(n56, xs41) ge(x16, 0) -> true ge(0, s(x26)) -> false ge(s(x36), s(y2)) -> ge(x36, y2) filterlow(n47, nil) -> nil equal_bool(ge(n4, x5), true) -> true | filterlow(n4, cons(x5, xs2)) -> filterlow(n4, xs2) equal_bool(ge(n4, x5), true) -> false | filterlow(n4, cons(x5, xs2)) -> cons(x5, filterlow(n4, xs2)) filterhigh(n83, nil) -> nil equal_bool(ge(x65, n56), true) -> true | filterhigh(n56, cons(x65, xs41)) -> filterhigh(n56, xs41) equal_bool(ge(x65, n56), true) -> false | filterhigh(n56, cons(x65, xs41)) -> cons(x65, filterhigh(n56, xs41)) if1(true, n, x, cons(x5, xs2)) -> if1(ge(n, x5), n, x5, xs2) if1(true, n, x, nil) -> nil if1(false, n38, x46, cons(x5, xs2)) -> cons(x46, if1(ge(n38, x5), n38, x5, xs2)) if1(false, n38, x46, nil) -> cons(x46, nil) if2(true, n65, x75, cons(x65, xs41)) -> if2(ge(x65, n65), n65, x65, xs41) if2(true, n65, x75, nil) -> nil if2(false, n74, x85, cons(x65, xs41)) -> cons(x85, if2(ge(x65, n74), n74, x65, xs41)) if2(false, n74, x85, nil) -> cons(x85, nil) using the following formula: x:sort[a0],xs:sort[a2].if2'(ge(x, x), x, x, xs)=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) Inverse Substitution [SOUND] (13) Formula (14) Induction by data structure [SOUND] (15) AND (16) Formula (17) Symbolic evaluation [EQUIVALENT] (18) YES (19) Formula (20) Symbolic evaluation under hypothesis [EQUIVALENT] (21) YES (22) Formula (23) Inverse Substitution [SOUND] (24) Formula (25) Induction by data structure [SOUND] (26) AND (27) Formula (28) Symbolic evaluation [EQUIVALENT] (29) YES (30) Formula (31) Symbolic evaluation under hypothesis [EQUIVALENT] (32) YES ---------------------------------------- (0) Obligation: Formula: x:sort[a0],xs:sort[a2].if2'(ge(x, x), x, x, xs)=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: xs:sort[a2].if2'(ge(0, 0), 0, 0, xs)=true There are no hypotheses. 1. Step Case: Formula: n:sort[a0],xs:sort[a2].if2'(ge(s(n), s(n)), s(n), s(n), xs)=true Hypotheses: n:sort[a0],!xs:sort[a2].if2'(ge(n, n), n, n, xs)=true ---------------------------------------- (2) Complex Obligation (AND) ---------------------------------------- (3) Obligation: Formula: xs:sort[a2].if2'(ge(0, 0), 0, 0, xs)=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],xs:sort[a2].if2'(ge(s(n), s(n)), s(n), s(n), xs)=true Hypotheses: n:sort[a0],!xs:sort[a2].if2'(ge(n, n), n, n, xs)=true ---------------------------------------- (7) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: n:sort[a0],xs:sort[a2].if2'(ge(n, n), s(n), s(n), xs)=true ---------------------------------------- (8) Obligation: Formula: n:sort[a0],xs:sort[a2].if2'(ge(n, n), s(n), s(n), xs)=true Hypotheses: n:sort[a0],!xs:sort[a2].if2'(ge(n, n), n, n, xs)=true ---------------------------------------- (9) Case Analysis (EQUIVALENT) Case analysis leads to the following new obligations: Formula: n:sort[a0],x_1:sort[a0],x_2:sort[a2].if2'(ge(n, n), s(n), s(n), cons(x_1, x_2))=true Hypotheses: n:sort[a0],!xs:sort[a2].if2'(ge(n, n), n, n, xs)=true Formula: n:sort[a0].if2'(ge(n, n), s(n), s(n), nil)=true Hypotheses: n:sort[a0],!xs:sort[a2].if2'(ge(n, n), n, n, xs)=true ---------------------------------------- (10) Complex Obligation (AND) ---------------------------------------- (11) Obligation: Formula: n:sort[a0],x_1:sort[a0],x_2:sort[a2].if2'(ge(n, n), s(n), s(n), cons(x_1, x_2))=true Hypotheses: n:sort[a0],!xs:sort[a2].if2'(ge(n, n), n, n, xs)=true ---------------------------------------- (12) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0],x_1:sort[a0],x_2:sort[a2].if2'(ge(n, n), n', n', cons(x_1, x_2))=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (13) Obligation: Formula: n:sort[a0],n':sort[a0],x_1:sort[a0],x_2:sort[a2].if2'(ge(n, n), n', n', cons(x_1, x_2))=true Hypotheses: n:sort[a0],!xs:sort[a2].if2'(ge(n, n), n, n, xs)=true ---------------------------------------- (14) 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_2:sort[a2].if2'(ge(0, 0), n', n', cons(x_1, x_2))=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0],x_2:sort[a2].if2'(ge(s(n''), s(n'')), n', n', cons(x_1, x_2))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0],!x_2:sort[a2].if2'(ge(n'', n''), n', n', cons(x_1, x_2))=true ---------------------------------------- (15) Complex Obligation (AND) ---------------------------------------- (16) Obligation: Formula: n':sort[a0],x_1:sort[a0],x_2:sort[a2].if2'(ge(0, 0), n', n', cons(x_1, x_2))=true There are no hypotheses. ---------------------------------------- (17) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (18) YES ---------------------------------------- (19) Obligation: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0],x_2:sort[a2].if2'(ge(s(n''), s(n'')), n', n', cons(x_1, x_2))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0],!x_2:sort[a2].if2'(ge(n'', n''), n', n', cons(x_1, x_2))=true ---------------------------------------- (20) 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_2:sort[a2].if2'(ge(n'', n''), n', n', cons(x_1, x_2))=true ---------------------------------------- (21) YES ---------------------------------------- (22) Obligation: Formula: n:sort[a0].if2'(ge(n, n), s(n), s(n), nil)=true Hypotheses: n:sort[a0],!xs:sort[a2].if2'(ge(n, n), n, n, xs)=true ---------------------------------------- (23) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0].if2'(ge(n, n), n', n', nil)=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (24) Obligation: Formula: n:sort[a0],n':sort[a0].if2'(ge(n, n), n', n', nil)=true Hypotheses: n:sort[a0],!xs:sort[a2].if2'(ge(n, n), n, n, xs)=true ---------------------------------------- (25) 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', nil)=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0].if2'(ge(s(n''), s(n'')), n', n', nil)=true Hypotheses: n'':sort[a0],!n':sort[a0].if2'(ge(n'', n''), n', n', nil)=true ---------------------------------------- (26) Complex Obligation (AND) ---------------------------------------- (27) Obligation: Formula: n':sort[a0].if2'(ge(0, 0), n', n', nil)=true There are no hypotheses. ---------------------------------------- (28) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (29) YES ---------------------------------------- (30) Obligation: Formula: n'':sort[a0],n':sort[a0].if2'(ge(s(n''), s(n'')), n', n', nil)=true Hypotheses: n'':sort[a0],!n':sort[a0].if2'(ge(n'', n''), n', n', nil)=true ---------------------------------------- (31) 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', nil)=true ---------------------------------------- (32) YES
QSORT(cons(x, xs)) → QSORT(if1(ge(x, x), x, x, 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))
QSORT(cons(x, xs)) → QSORT(if1(ge(x, x), x, x, xs))
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
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))
filterhigh(x0, nil)
filterhigh(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
QSORT(cons(x, xs)) → QSORT(if1(ge(x, x), x, x, xs))
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
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))
POL(0) = 1
POL(QSORT(x1)) = x1
POL(cons(x1, x2)) = 1 + x2
POL(false) = 0
POL(filterlow(x1, x2)) = x2
POL(ge(x1, x2)) = x2
POL(if1(x1, x2, x3, x4)) = 1 + x4
POL(nil) = 1
POL(s(x1)) = x1
POL(true) = 1
[x, x0, x1, x2, x3, n6, x12, xs4, n16, x26, x19, xs8, n21, n11, x5, y', x39] 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[a36](witness_sort[a36], witness_sort[a36]) -> true if1'(true, n6, x12, xs4) -> true if1'(false, n16, x26, cons(x19, xs8)) -> if1'(ge(n16, x19), n16, x19, xs8) if1'(false, n16, x26, nil) -> false filterlow'(n21, nil) -> false equal_bool(ge(n11, x19), true) -> true | filterlow'(n11, cons(x19, xs8)) -> true equal_bool(ge(n11, x19), true) -> false | filterlow'(n11, cons(x19, xs8)) -> filterlow'(n11, xs8) ge(x, 0) -> true ge(s(x5), s(y')) -> ge(x5, y') ge(0, s(x39)) -> false filterlow(n21, nil) -> nil equal_bool(ge(n11, x19), true) -> true | filterlow(n11, cons(x19, xs8)) -> filterlow(n11, xs8) equal_bool(ge(n11, x19), true) -> false | filterlow(n11, cons(x19, xs8)) -> cons(x19, filterlow(n11, xs8)) if1(true, n6, x12, cons(x19, xs8)) -> if1(ge(n6, x19), n6, x19, xs8) if1(true, n6, x12, nil) -> nil if1(false, n16, x26, cons(x19, xs8)) -> cons(x26, if1(ge(n16, x19), n16, x19, xs8)) if1(false, n16, x26, nil) -> cons(x26, nil)
proof of internal # AProVE Commit ID: 9a00b172b26c9abb2d4c4d5eaf341e919eb0fbf1 nowonder 20100222 unpublished dirty Partial correctness of the following Program [x, x0, x1, x2, x3, n6, x12, xs4, n16, x26, x19, xs8, n21, n11, x5, y', x39] 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[a36](witness_sort[a36], witness_sort[a36]) -> true if1'(true, n6, x12, xs4) -> true if1'(false, n16, x26, cons(x19, xs8)) -> if1'(ge(n16, x19), n16, x19, xs8) if1'(false, n16, x26, nil) -> false filterlow'(n21, nil) -> false equal_bool(ge(n11, x19), true) -> true | filterlow'(n11, cons(x19, xs8)) -> true equal_bool(ge(n11, x19), true) -> false | filterlow'(n11, cons(x19, xs8)) -> filterlow'(n11, xs8) ge(x, 0) -> true ge(s(x5), s(y')) -> ge(x5, y') ge(0, s(x39)) -> false filterlow(n21, nil) -> nil equal_bool(ge(n11, x19), true) -> true | filterlow(n11, cons(x19, xs8)) -> filterlow(n11, xs8) equal_bool(ge(n11, x19), true) -> false | filterlow(n11, cons(x19, xs8)) -> cons(x19, filterlow(n11, xs8)) if1(true, n6, x12, cons(x19, xs8)) -> if1(ge(n6, x19), n6, x19, xs8) if1(true, n6, x12, nil) -> nil if1(false, n16, x26, cons(x19, xs8)) -> cons(x26, if1(ge(n16, x19), n16, x19, xs8)) if1(false, n16, x26, nil) -> cons(x26, nil) using the following formula: x:sort[a0],xs:sort[a5].if1'(ge(x, x), x, x, xs)=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) Inverse Substitution [SOUND] (13) Formula (14) Induction by data structure [SOUND] (15) AND (16) Formula (17) Symbolic evaluation [EQUIVALENT] (18) YES (19) Formula (20) Symbolic evaluation under hypothesis [EQUIVALENT] (21) YES (22) Formula (23) Inverse Substitution [SOUND] (24) Formula (25) Induction by data structure [SOUND] (26) AND (27) Formula (28) Symbolic evaluation [EQUIVALENT] (29) YES (30) Formula (31) Symbolic evaluation under hypothesis [EQUIVALENT] (32) YES ---------------------------------------- (0) Obligation: Formula: x:sort[a0],xs:sort[a5].if1'(ge(x, x), x, x, xs)=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: xs:sort[a5].if1'(ge(0, 0), 0, 0, xs)=true There are no hypotheses. 1. Step Case: Formula: n:sort[a0],xs:sort[a5].if1'(ge(s(n), s(n)), s(n), s(n), xs)=true Hypotheses: n:sort[a0],!xs:sort[a5].if1'(ge(n, n), n, n, xs)=true ---------------------------------------- (2) Complex Obligation (AND) ---------------------------------------- (3) Obligation: Formula: xs:sort[a5].if1'(ge(0, 0), 0, 0, xs)=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],xs:sort[a5].if1'(ge(s(n), s(n)), s(n), s(n), xs)=true Hypotheses: n:sort[a0],!xs:sort[a5].if1'(ge(n, n), n, n, xs)=true ---------------------------------------- (7) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: n:sort[a0],xs:sort[a5].if1'(ge(n, n), s(n), s(n), xs)=true ---------------------------------------- (8) Obligation: Formula: n:sort[a0],xs:sort[a5].if1'(ge(n, n), s(n), s(n), xs)=true Hypotheses: n:sort[a0],!xs:sort[a5].if1'(ge(n, n), n, n, xs)=true ---------------------------------------- (9) Case Analysis (EQUIVALENT) Case analysis leads to the following new obligations: Formula: n:sort[a0],x_1:sort[a0],x_2:sort[a5].if1'(ge(n, n), s(n), s(n), cons(x_1, x_2))=true Hypotheses: n:sort[a0],!xs:sort[a5].if1'(ge(n, n), n, n, xs)=true Formula: n:sort[a0].if1'(ge(n, n), s(n), s(n), nil)=true Hypotheses: n:sort[a0],!xs:sort[a5].if1'(ge(n, n), n, n, xs)=true ---------------------------------------- (10) Complex Obligation (AND) ---------------------------------------- (11) Obligation: Formula: n:sort[a0],x_1:sort[a0],x_2:sort[a5].if1'(ge(n, n), s(n), s(n), cons(x_1, x_2))=true Hypotheses: n:sort[a0],!xs:sort[a5].if1'(ge(n, n), n, n, xs)=true ---------------------------------------- (12) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0],x_1:sort[a0],x_2:sort[a5].if1'(ge(n, n), n', n', cons(x_1, x_2))=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (13) Obligation: Formula: n:sort[a0],n':sort[a0],x_1:sort[a0],x_2:sort[a5].if1'(ge(n, n), n', n', cons(x_1, x_2))=true Hypotheses: n:sort[a0],!xs:sort[a5].if1'(ge(n, n), n, n, xs)=true ---------------------------------------- (14) 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_2:sort[a5].if1'(ge(0, 0), n', n', cons(x_1, x_2))=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0],x_2:sort[a5].if1'(ge(s(n''), s(n'')), n', n', cons(x_1, x_2))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0],!x_2:sort[a5].if1'(ge(n'', n''), n', n', cons(x_1, x_2))=true ---------------------------------------- (15) Complex Obligation (AND) ---------------------------------------- (16) Obligation: Formula: n':sort[a0],x_1:sort[a0],x_2:sort[a5].if1'(ge(0, 0), n', n', cons(x_1, x_2))=true There are no hypotheses. ---------------------------------------- (17) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (18) YES ---------------------------------------- (19) Obligation: Formula: n'':sort[a0],n':sort[a0],x_1:sort[a0],x_2:sort[a5].if1'(ge(s(n''), s(n'')), n', n', cons(x_1, x_2))=true Hypotheses: n'':sort[a0],!n':sort[a0],!x_1:sort[a0],!x_2:sort[a5].if1'(ge(n'', n''), n', n', cons(x_1, x_2))=true ---------------------------------------- (20) 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_2:sort[a5].if1'(ge(n'', n''), n', n', cons(x_1, x_2))=true ---------------------------------------- (21) YES ---------------------------------------- (22) Obligation: Formula: n:sort[a0].if1'(ge(n, n), s(n), s(n), nil)=true Hypotheses: n:sort[a0],!xs:sort[a5].if1'(ge(n, n), n, n, xs)=true ---------------------------------------- (23) Inverse Substitution (SOUND) The formula could be generalised by inverse substitution to: n:sort[a0],n':sort[a0].if1'(ge(n, n), n', n', nil)=true Inverse substitution used: [s(n)/n'] ---------------------------------------- (24) Obligation: Formula: n:sort[a0],n':sort[a0].if1'(ge(n, n), n', n', nil)=true Hypotheses: n:sort[a0],!xs:sort[a5].if1'(ge(n, n), n, n, xs)=true ---------------------------------------- (25) 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', nil)=true There are no hypotheses. 1. Step Case: Formula: n'':sort[a0],n':sort[a0].if1'(ge(s(n''), s(n'')), n', n', nil)=true Hypotheses: n'':sort[a0],!n':sort[a0].if1'(ge(n'', n''), n', n', nil)=true ---------------------------------------- (26) Complex Obligation (AND) ---------------------------------------- (27) Obligation: Formula: n':sort[a0].if1'(ge(0, 0), n', n', nil)=true There are no hypotheses. ---------------------------------------- (28) Symbolic evaluation (EQUIVALENT) Could be reduced to the following new obligation by simple symbolic evaluation: True ---------------------------------------- (29) YES ---------------------------------------- (30) Obligation: Formula: n'':sort[a0],n':sort[a0].if1'(ge(s(n''), s(n'')), n', n', nil)=true Hypotheses: n'':sort[a0],!n':sort[a0].if1'(ge(n'', n''), n', n', nil)=true ---------------------------------------- (31) 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', nil)=true ---------------------------------------- (32) YES
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
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))
if1'(true, n6, x12, xs4) → true
filterlow'(n11, cons(x19, xs8)) → if1'(ge(n11, x19), n11, x19, xs8)
if1'(false, n16, x26, xs12) → filterlow'(n16, xs12)
filterlow'(n21, nil) → false
ge(x, 0) → true
ge(s(x5), s(y')) → ge(x5, y')
if1(true, n6, x12, xs4) → filterlow(n6, xs4)
filterlow(n11, cons(x19, xs8)) → if1(ge(n11, x19), n11, x19, xs8)
if1(false, n16, x26, xs12) → cons(x26, filterlow(n16, xs12))
filterlow(n21, nil) → nil
ge(0, s(x39)) → 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[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[a36](witness_sort[a36], witness_sort[a36]) → true
[if1'4, filterlow'2] > [true, ge2, if14, filterlow2, equalbool2, isafalse1] > [cons2, and2] > false
nil > [true, ge2, if14, filterlow2, equalbool2, isafalse1] > [cons2, and2] > false
0 > false
or2 > false
not1 > [true, ge2, if14, filterlow2, equalbool2, isafalse1] > [cons2, and2] > false
isatrue1 > false
equalsort[a0]2 > [true, ge2, if14, filterlow2, equalbool2, isafalse1] > [cons2, and2] > false
equalsort[a5]2 > [cons2, and2] > false
equalsort[a36]2 > [true, ge2, if14, filterlow2, equalbool2, isafalse1] > [cons2, and2] > false
witnesssort[a36] > false
if1'4: [2,4,3,1]
true: multiset
filterlow'2: [1,2]
cons2: multiset
ge2: [1,2]
false: multiset
nil: multiset
0: multiset
if14: [2,4,1,3]
filterlow2: [1,2]
equalbool2: [1,2]
and2: multiset
or2: multiset
not1: multiset
isatrue1: multiset
isafalse1: [1]
equalsort[a0]2: multiset
equalsort[a5]2: [2,1]
equalsort[a36]2: multiset
witnesssort[a36]: multiset
if1'(true, n6, x12, xs4) → true
filterlow'(n11, cons(x19, xs8)) → if1'(ge(n11, x19), n11, x19, xs8)
if1'(false, n16, x26, xs12) → filterlow'(n16, xs12)
filterlow'(n21, nil) → false
ge(x, 0) → true
if1(true, n6, x12, xs4) → filterlow(n6, xs4)
filterlow(n11, cons(x19, xs8)) → if1(ge(n11, x19), n11, x19, xs8)
if1(false, n16, x26, xs12) → cons(x26, filterlow(n16, xs12))
filterlow(n21, nil) → nil
ge(0, s(x39)) → 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[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[a36](witness_sort[a36], witness_sort[a36]) → true
ge(s(x5), s(y')) → ge(x5, y')
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(x5), s(y')) → ge(x5, y')
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
filterhigh'(n56, cons(x65, xs41)) → if2'(ge(x65, n56), n56, x65, xs41)
if2'(true, n65, x75, xs48) → true
if2'(false, n74, x85, xs55) → filterhigh'(n74, xs55)
filterhigh'(n83, nil) → false
if1(true, n, x, xs) → filterlow(n, xs)
filterlow(n4, cons(x5, xs2)) → if1(ge(n4, x5), n4, x5, xs2)
ge(x16, 0) → true
ge(0, s(x26)) → false
ge(s(x36), s(y2)) → ge(x36, y2)
if1(false, n38, x46, xs28) → cons(x46, filterlow(n38, xs28))
filterlow(n47, nil) → nil
filterhigh(n56, cons(x65, xs41)) → if2(ge(x65, n56), n56, x65, xs41)
if2(true, n65, x75, xs48) → filterhigh(n65, xs48)
if2(false, n74, x85, xs55) → cons(x85, filterhigh(n74, xs55))
filterhigh(n83, 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[a2](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a2](x0, x2), equal_sort[a2](x1, x3))
equal_sort[a2](cons(x0, x1), nil) → false
equal_sort[a2](nil, cons(x0, x1)) → false
equal_sort[a2](nil, nil) → true
equal_sort[a55](witness_sort[a55], witness_sort[a55]) → true
nil > [false, not1] > [true, equalsort[a55]2] > [if14, filterlow2] > cons2 > [filterhigh'2, if2'4] > ge2
nil > [false, not1] > [true, equalsort[a55]2] > [if14, filterlow2] > cons2 > and2
nil > [false, not1] > [true, equalsort[a55]2] > [filterhigh2, if24] > cons2 > [filterhigh'2, if2'4] > ge2
nil > [false, not1] > [true, equalsort[a55]2] > [filterhigh2, if24] > cons2 > and2
0 > [false, not1] > [true, equalsort[a55]2] > [if14, filterlow2] > cons2 > [filterhigh'2, if2'4] > ge2
0 > [false, not1] > [true, equalsort[a55]2] > [if14, filterlow2] > cons2 > and2
0 > [false, not1] > [true, equalsort[a55]2] > [filterhigh2, if24] > cons2 > [filterhigh'2, if2'4] > ge2
0 > [false, not1] > [true, equalsort[a55]2] > [filterhigh2, if24] > cons2 > and2
isafalse1 > [false, not1] > [true, equalsort[a55]2] > [if14, filterlow2] > cons2 > [filterhigh'2, if2'4] > ge2
isafalse1 > [false, not1] > [true, equalsort[a55]2] > [if14, filterlow2] > cons2 > and2
isafalse1 > [false, not1] > [true, equalsort[a55]2] > [filterhigh2, if24] > cons2 > [filterhigh'2, if2'4] > ge2
isafalse1 > [false, not1] > [true, equalsort[a55]2] > [filterhigh2, if24] > cons2 > and2
equalsort[a0]2 > [true, equalsort[a55]2] > [if14, filterlow2] > cons2 > [filterhigh'2, if2'4] > ge2
equalsort[a0]2 > [true, equalsort[a55]2] > [if14, filterlow2] > cons2 > and2
equalsort[a0]2 > [true, equalsort[a55]2] > [filterhigh2, if24] > cons2 > [filterhigh'2, if2'4] > ge2
equalsort[a0]2 > [true, equalsort[a55]2] > [filterhigh2, if24] > cons2 > and2
equalsort[a2]2 > [true, equalsort[a55]2] > [if14, filterlow2] > cons2 > [filterhigh'2, if2'4] > ge2
equalsort[a2]2 > [true, equalsort[a55]2] > [if14, filterlow2] > cons2 > and2
equalsort[a2]2 > [true, equalsort[a55]2] > [filterhigh2, if24] > cons2 > [filterhigh'2, if2'4] > ge2
equalsort[a2]2 > [true, equalsort[a55]2] > [filterhigh2, if24] > cons2 > and2
filterhigh'2: [1,2]
cons2: [2,1]
if2'4: [2,4,3,1]
ge2: [1,2]
true: multiset
false: multiset
nil: multiset
if14: [4,2,1,3]
filterlow2: [2,1]
0: multiset
filterhigh2: [1,2]
if24: [2,4,1,3]
equalbool2: [2,1]
and2: [2,1]
or2: [2,1]
not1: multiset
isatrue1: [1]
isafalse1: [1]
equalsort[a0]2: multiset
equalsort[a2]2: multiset
equalsort[a55]2: multiset
witnesssort[a55]: multiset
filterhigh'(n56, cons(x65, xs41)) → if2'(ge(x65, n56), n56, x65, xs41)
if2'(true, n65, x75, xs48) → true
if2'(false, n74, x85, xs55) → filterhigh'(n74, xs55)
filterhigh'(n83, nil) → false
if1(true, n, x, xs) → filterlow(n, xs)
filterlow(n4, cons(x5, xs2)) → if1(ge(n4, x5), n4, x5, xs2)
ge(x16, 0) → true
ge(0, s(x26)) → false
if1(false, n38, x46, xs28) → cons(x46, filterlow(n38, xs28))
filterlow(n47, nil) → nil
filterhigh(n56, cons(x65, xs41)) → if2(ge(x65, n56), n56, x65, xs41)
if2(true, n65, x75, xs48) → filterhigh(n65, xs48)
if2(false, n74, x85, xs55) → cons(x85, filterhigh(n74, xs55))
filterhigh(n83, 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[a2](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a2](x0, x2), equal_sort[a2](x1, x3))
equal_sort[a2](cons(x0, x1), nil) → false
equal_sort[a2](nil, cons(x0, x1)) → false
equal_sort[a2](nil, nil) → true
equal_sort[a55](witness_sort[a55], witness_sort[a55]) → true
ge(s(x36), s(y2)) → ge(x36, y2)
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(x36), s(y2)) → ge(x36, y2)
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)