0 QTRS
↳1 AAECC Innermost (⇔)
↳2 QTRS
↳3 DependencyPairsProof (⇔)
↳4 QDP
↳5 DependencyGraphProof (⇔)
↳6 AND
↳7 QDP
↳8 QDPOrderProof (⇔)
↳9 QDP
↳10 PisEmptyProof (⇔)
↳11 TRUE
↳12 QDP
↳13 QDPOrderProof (⇔)
↳14 QDP
↳15 PisEmptyProof (⇔)
↳16 TRUE
↳17 QDP
↳18 QDPOrderProof (⇔)
↳19 QDP
↳20 PisEmptyProof (⇔)
↳21 TRUE
↳22 QDP
↳23 QDP
↳24 QDPOrderProof (⇔)
↳25 QDP
↳26 PisEmptyProof (⇔)
↳27 TRUE
↳28 QDP
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
quicksort(x) → ifquick(isempty(x), x)
a → b
a → c
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a
AVERAGE(x, y) → IF(ge(x, y), x, y)
AVERAGE(x, y) → GE(x, y)
IF(true, x, y) → AVERITER(y, x, y)
IF(false, x, y) → AVERITER(x, y, x)
AVERITER(x, y, z) → IFITER(ge(x, y), x, y, z)
AVERITER(x, y, z) → GE(x, y)
IFITER(false, x, y, z) → AVERITER(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
IFITER(false, x, y, z) → PLUS(x, s(s(s(0))))
IFITER(false, x, y, z) → PLUS(y, s(0))
IFITER(false, x, y, z) → PLUS(z, s(0))
LOW(n, cons(m, x)) → IF_LOW(ge(m, n), n, cons(m, x))
LOW(n, cons(m, x)) → GE(m, n)
IF_LOW(false, n, cons(m, x)) → LOW(n, x)
IF_LOW(true, n, cons(m, x)) → LOW(n, x)
HIGH(n, cons(m, x)) → IF_HIGH(ge(m, n), n, cons(m, x))
HIGH(n, cons(m, x)) → GE(m, n)
IF_HIGH(false, n, cons(m, x)) → HIGH(n, x)
IF_HIGH(true, n, cons(m, x)) → AVERAGE(m, m)
IF_HIGH(true, n, cons(m, x)) → HIGH(n, x)
QUICKSORT(x) → IFQUICK(isempty(x), x)
QUICKSORT(x) → ISEMPTY(x)
IFQUICK(false, x) → APPEND(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
IFQUICK(false, x) → QUICKSORT(low(head(x), tail(x)))
IFQUICK(false, x) → LOW(head(x), tail(x))
IFQUICK(false, x) → HEAD(x)
IFQUICK(false, x) → TAIL(x)
IFQUICK(false, x) → QUICKSORT(high(head(x), tail(x)))
IFQUICK(false, x) → HIGH(head(x), tail(x))
PLUS(s(x), y) → PLUS(x, y)
GE(s(x), s(y)) → GE(x, y)
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a
GE(s(x), s(y)) → GE(x, y)
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
GE(s(x), s(y)) → GE(x, y)
s1 > GE1
GE1: multiset
s1: multiset
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a
PLUS(s(x), y) → PLUS(x, y)
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
PLUS(s(x), y) → PLUS(x, y)
s1 > PLUS1
PLUS1: multiset
s1: multiset
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a
IF_LOW(false, n, cons(m, x)) → LOW(n, x)
LOW(n, cons(m, x)) → IF_LOW(ge(m, n), n, cons(m, x))
IF_LOW(true, n, cons(m, x)) → LOW(n, x)
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
IF_LOW(false, n, cons(m, x)) → LOW(n, x)
LOW(n, cons(m, x)) → IF_LOW(ge(m, n), n, cons(m, x))
IF_LOW(true, n, cons(m, x)) → LOW(n, x)
cons1 > LOW1
0 > false > LOW1
0 > true > LOW1
false: multiset
cons1: multiset
LOW1: multiset
ge: multiset
true: multiset
0: multiset
s: multiset
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a
IFITER(false, x, y, z) → AVERITER(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
AVERITER(x, y, z) → IFITER(ge(x, y), x, y, z)
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a
IF_HIGH(false, n, cons(m, x)) → HIGH(n, x)
HIGH(n, cons(m, x)) → IF_HIGH(ge(m, n), n, cons(m, x))
IF_HIGH(true, n, cons(m, x)) → HIGH(n, x)
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
IF_HIGH(false, n, cons(m, x)) → HIGH(n, x)
HIGH(n, cons(m, x)) → IF_HIGH(ge(m, n), n, cons(m, x))
IF_HIGH(true, n, cons(m, x)) → HIGH(n, x)
cons1 > HIGH1
0 > false > HIGH1
0 > true > HIGH1
false: multiset
cons1: multiset
HIGH1: multiset
ge: multiset
true: multiset
0: multiset
s: multiset
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a
IFQUICK(false, x) → QUICKSORT(low(head(x), tail(x)))
QUICKSORT(x) → IFQUICK(isempty(x), x)
IFQUICK(false, x) → QUICKSORT(high(head(x), tail(x)))
average(x, y) → if(ge(x, y), x, y)
if(true, x, y) → averIter(y, x, y)
if(false, x, y) → averIter(x, y, x)
averIter(x, y, z) → ifIter(ge(x, y), x, y, z)
ifIter(true, x, y, z) → z
ifIter(false, x, y, z) → averIter(plus(x, s(s(s(0)))), plus(y, s(0)), plus(z, s(0)))
append(nil, y) → y
append(cons(n, x), y) → cons(n, app(x, y))
low(n, nil) → nil
low(n, cons(m, x)) → if_low(ge(m, n), n, cons(m, x))
if_low(false, n, cons(m, x)) → cons(m, low(n, x))
if_low(true, n, cons(m, x)) → low(n, x)
high(n, nil) → nil
high(n, cons(m, x)) → if_high(ge(m, n), n, cons(m, x))
if_high(false, n, cons(m, x)) → high(n, x)
if_high(true, n, cons(m, x)) → cons(average(m, m), high(n, x))
quicksort(x) → ifquick(isempty(x), x)
ifquick(true, x) → nil
ifquick(false, x) → append(quicksort(low(head(x), tail(x))), cons(tail(x), quicksort(high(head(x), tail(x)))))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
isempty(nil) → true
isempty(cons(n, x)) → false
head(nil) → error
head(cons(n, x)) → n
tail(nil) → nil
tail(cons(n, x)) → x
ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
a → b
a → c
average(x0, x1)
if(true, x0, x1)
if(false, x0, x1)
averIter(x0, x1, x2)
ifIter(true, x0, x1, x2)
ifIter(false, x0, x1, x2)
append(nil, x0)
append(cons(x0, x1), x2)
low(x0, nil)
low(x0, cons(x1, x2))
if_low(false, x0, cons(x1, x2))
if_low(true, x0, cons(x1, x2))
high(x0, nil)
high(x0, cons(x1, x2))
if_high(false, x0, cons(x1, x2))
if_high(true, x0, cons(x1, x2))
quicksort(x0)
ifquick(true, x0)
ifquick(false, x0)
plus(0, x0)
plus(s(x0), x1)
isempty(nil)
isempty(cons(x0, x1))
head(nil)
head(cons(x0, x1))
tail(nil)
tail(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
a