(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if1(true, x, y, xs) → min(x, xs)
if1(false, x, y, xs) → min(y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
minsort(nil) → nil
minsort(cons(x, y)) → cons(min(x, y), minsort(del(min(x, y), cons(x, y))))
min(x, nil) → x
min(x, cons(y, z)) → if1(le(x, y), x, y, z)
del(x, nil) → nil
del(x, cons(y, z)) → if2(eq(x, y), x, y, z)
Q is empty.
(1) Overlay + Local Confluence (EQUIVALENT transformation)
The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.
(2) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if1(true, x, y, xs) → min(x, xs)
if1(false, x, y, xs) → min(y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
minsort(nil) → nil
minsort(cons(x, y)) → cons(min(x, y), minsort(del(min(x, y), cons(x, y))))
min(x, nil) → x
min(x, cons(y, z)) → if1(le(x, y), x, y, z)
del(x, nil) → nil
del(x, cons(y, z)) → if2(eq(x, y), x, y, z)
The set Q consists of the following terms:
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
minsort(nil)
minsort(cons(x0, x1))
min(x0, nil)
min(x0, cons(x1, x2))
del(x0, nil)
del(x0, cons(x1, x2))
(3) DependencyPairsProof (EQUIVALENT transformation)
Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.
(4) Obligation:
Q DP problem:
The TRS P consists of the following rules:
LE(s(x), s(y)) → LE(x, y)
EQ(s(x), s(y)) → EQ(x, y)
IF1(true, x, y, xs) → MIN(x, xs)
IF1(false, x, y, xs) → MIN(y, xs)
IF2(false, x, y, xs) → DEL(x, xs)
MINSORT(cons(x, y)) → MIN(x, y)
MINSORT(cons(x, y)) → MINSORT(del(min(x, y), cons(x, y)))
MINSORT(cons(x, y)) → DEL(min(x, y), cons(x, y))
MIN(x, cons(y, z)) → IF1(le(x, y), x, y, z)
MIN(x, cons(y, z)) → LE(x, y)
DEL(x, cons(y, z)) → IF2(eq(x, y), x, y, z)
DEL(x, cons(y, z)) → EQ(x, y)
The TRS R consists of the following rules:
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if1(true, x, y, xs) → min(x, xs)
if1(false, x, y, xs) → min(y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
minsort(nil) → nil
minsort(cons(x, y)) → cons(min(x, y), minsort(del(min(x, y), cons(x, y))))
min(x, nil) → x
min(x, cons(y, z)) → if1(le(x, y), x, y, z)
del(x, nil) → nil
del(x, cons(y, z)) → if2(eq(x, y), x, y, z)
The set Q consists of the following terms:
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
minsort(nil)
minsort(cons(x0, x1))
min(x0, nil)
min(x0, cons(x1, x2))
del(x0, nil)
del(x0, cons(x1, x2))
We have to consider all minimal (P,Q,R)-chains.
(5) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 5 SCCs with 4 less nodes.
(6) Complex Obligation (AND)
(7) Obligation:
Q DP problem:
The TRS P consists of the following rules:
EQ(s(x), s(y)) → EQ(x, y)
The TRS R consists of the following rules:
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if1(true, x, y, xs) → min(x, xs)
if1(false, x, y, xs) → min(y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
minsort(nil) → nil
minsort(cons(x, y)) → cons(min(x, y), minsort(del(min(x, y), cons(x, y))))
min(x, nil) → x
min(x, cons(y, z)) → if1(le(x, y), x, y, z)
del(x, nil) → nil
del(x, cons(y, z)) → if2(eq(x, y), x, y, z)
The set Q consists of the following terms:
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
minsort(nil)
minsort(cons(x0, x1))
min(x0, nil)
min(x0, cons(x1, x2))
del(x0, nil)
del(x0, cons(x1, x2))
We have to consider all minimal (P,Q,R)-chains.
(8) Obligation:
Q DP problem:
The TRS P consists of the following rules:
DEL(x, cons(y, z)) → IF2(eq(x, y), x, y, z)
IF2(false, x, y, xs) → DEL(x, xs)
The TRS R consists of the following rules:
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if1(true, x, y, xs) → min(x, xs)
if1(false, x, y, xs) → min(y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
minsort(nil) → nil
minsort(cons(x, y)) → cons(min(x, y), minsort(del(min(x, y), cons(x, y))))
min(x, nil) → x
min(x, cons(y, z)) → if1(le(x, y), x, y, z)
del(x, nil) → nil
del(x, cons(y, z)) → if2(eq(x, y), x, y, z)
The set Q consists of the following terms:
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
minsort(nil)
minsort(cons(x0, x1))
min(x0, nil)
min(x0, cons(x1, x2))
del(x0, nil)
del(x0, cons(x1, x2))
We have to consider all minimal (P,Q,R)-chains.
(9) Obligation:
Q DP problem:
The TRS P consists of the following rules:
LE(s(x), s(y)) → LE(x, y)
The TRS R consists of the following rules:
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if1(true, x, y, xs) → min(x, xs)
if1(false, x, y, xs) → min(y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
minsort(nil) → nil
minsort(cons(x, y)) → cons(min(x, y), minsort(del(min(x, y), cons(x, y))))
min(x, nil) → x
min(x, cons(y, z)) → if1(le(x, y), x, y, z)
del(x, nil) → nil
del(x, cons(y, z)) → if2(eq(x, y), x, y, z)
The set Q consists of the following terms:
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
minsort(nil)
minsort(cons(x0, x1))
min(x0, nil)
min(x0, cons(x1, x2))
del(x0, nil)
del(x0, cons(x1, x2))
We have to consider all minimal (P,Q,R)-chains.
(10) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MIN(x, cons(y, z)) → IF1(le(x, y), x, y, z)
IF1(true, x, y, xs) → MIN(x, xs)
IF1(false, x, y, xs) → MIN(y, xs)
The TRS R consists of the following rules:
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if1(true, x, y, xs) → min(x, xs)
if1(false, x, y, xs) → min(y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
minsort(nil) → nil
minsort(cons(x, y)) → cons(min(x, y), minsort(del(min(x, y), cons(x, y))))
min(x, nil) → x
min(x, cons(y, z)) → if1(le(x, y), x, y, z)
del(x, nil) → nil
del(x, cons(y, z)) → if2(eq(x, y), x, y, z)
The set Q consists of the following terms:
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
minsort(nil)
minsort(cons(x0, x1))
min(x0, nil)
min(x0, cons(x1, x2))
del(x0, nil)
del(x0, cons(x1, x2))
We have to consider all minimal (P,Q,R)-chains.
(11) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MINSORT(cons(x, y)) → MINSORT(del(min(x, y), cons(x, y)))
The TRS R consists of the following rules:
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if1(true, x, y, xs) → min(x, xs)
if1(false, x, y, xs) → min(y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
minsort(nil) → nil
minsort(cons(x, y)) → cons(min(x, y), minsort(del(min(x, y), cons(x, y))))
min(x, nil) → x
min(x, cons(y, z)) → if1(le(x, y), x, y, z)
del(x, nil) → nil
del(x, cons(y, z)) → if2(eq(x, y), x, y, z)
The set Q consists of the following terms:
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
minsort(nil)
minsort(cons(x0, x1))
min(x0, nil)
min(x0, cons(x1, x2))
del(x0, nil)
del(x0, cons(x1, x2))
We have to consider all minimal (P,Q,R)-chains.