(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

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:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

(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:

EQ(s(n), s(m)) → EQ(n, m)
LE(s(n), s(m)) → LE(n, m)
MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))
MIN(cons(n, cons(m, x))) → LE(n, m)
IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x))
IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x))
REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
REPLACE(n, m, cons(k, x)) → EQ(n, k)
IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)
SORT(cons(n, x)) → MIN(cons(n, x))
SORT(cons(n, x)) → SORT(replace(min(cons(n, x)), n, x))
SORT(cons(n, x)) → REPLACE(min(cons(n, x)), n, x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

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:

LE(s(n), s(m)) → LE(n, m)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


LE(s(n), s(m)) → LE(n, m)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
LE(x1, x2)  =  LE(x1)
s(x1)  =  s(x1)

Recursive path order with status [RPO].
Precedence:
s1 > LE1

Status:
s1: multiset
LE1: multiset

The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(10) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(11) TRUE

(12) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))
IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x))
IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF_MIN(true, cons(n, cons(m, x))) → MIN(cons(n, x))
IF_MIN(false, cons(n, cons(m, x))) → MIN(cons(m, x))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MIN(x1)  =  x1
cons(x1, x2)  =  cons(x2)
IF_MIN(x1, x2)  =  x2
le(x1, x2)  =  x2
true  =  true
false  =  false
s(x1)  =  s
0  =  0

Recursive path order with status [RPO].
Precedence:
trivial

Status:
cons1: multiset
true: multiset
false: multiset
s: multiset
0: multiset

The following usable rules [FROCOS05] were oriented: none

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MIN(cons(n, cons(m, x))) → IF_MIN(le(n, m), cons(n, cons(m, x)))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(15) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(16) TRUE

(17) Obligation:

Q DP problem:
The TRS P consists of the following rules:

EQ(s(n), s(m)) → EQ(n, m)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(18) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


EQ(s(n), s(m)) → EQ(n, m)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
EQ(x1, x2)  =  EQ(x1)
s(x1)  =  s(x1)

Recursive path order with status [RPO].
Precedence:
s1 > EQ1

Status:
EQ1: multiset
s1: multiset

The following usable rules [FROCOS05] were oriented: none

(19) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(20) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(21) TRUE

(22) Obligation:

Q DP problem:
The TRS P consists of the following rules:

REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


REPLACE(n, m, cons(k, x)) → IF_REPLACE(eq(n, k), n, m, cons(k, x))
IF_REPLACE(false, n, m, cons(k, x)) → REPLACE(n, m, x)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
REPLACE(x1, x2, x3)  =  REPLACE(x3)
cons(x1, x2)  =  cons(x1, x2)
IF_REPLACE(x1, x2, x3, x4)  =  x4
eq(x1, x2)  =  eq
false  =  false
s(x1)  =  s
0  =  0
true  =  true

Recursive path order with status [RPO].
Precedence:
cons2 > REPLACE1 > eq
false > eq
s > eq
0 > eq
true > eq

Status:
eq: multiset
cons2: multiset
true: multiset
false: multiset
REPLACE1: multiset
s: multiset
0: multiset

The following usable rules [FROCOS05] were oriented: none

(24) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(25) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(26) TRUE

(27) Obligation:

Q DP problem:
The TRS P consists of the following rules:

SORT(cons(n, x)) → SORT(replace(min(cons(n, x)), n, x))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(28) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


SORT(cons(n, x)) → SORT(replace(min(cons(n, x)), n, x))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
SORT(x1)  =  SORT(x1)
cons(x1, x2)  =  cons(x2)
replace(x1, x2, x3)  =  x3
min(x1)  =  min
eq(x1, x2)  =  eq
s(x1)  =  x1
0  =  0
false  =  false
true  =  true
nil  =  nil
le(x1, x2)  =  le
if_min(x1, x2)  =  x2
if_replace(x1, x2, x3, x4)  =  x4

Recursive path order with status [RPO].
Precedence:
SORT1 > cons1 > le
min > 0 > false > cons1 > le
min > 0 > true > le
eq > false > cons1 > le
eq > true > le
nil > 0 > false > cons1 > le
nil > 0 > true > le

Status:
eq: multiset
cons1: [1]
SORT1: multiset
true: multiset
false: multiset
min: multiset
0: multiset
nil: multiset
le: multiset

The following usable rules [FROCOS05] were oriented:

if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))

(29) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(m)) → false
eq(s(n), 0) → false
eq(s(n), s(m)) → eq(n, m)
le(0, m) → true
le(s(n), 0) → false
le(s(n), s(m)) → le(n, m)
min(cons(0, nil)) → 0
min(cons(s(n), nil)) → s(n)
min(cons(n, cons(m, x))) → if_min(le(n, m), cons(n, cons(m, x)))
if_min(true, cons(n, cons(m, x))) → min(cons(n, x))
if_min(false, cons(n, cons(m, x))) → min(cons(m, x))
replace(n, m, nil) → nil
replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
if_replace(true, n, m, cons(k, x)) → cons(m, x)
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
sort(nil) → nil
sort(cons(n, x)) → cons(min(cons(n, x)), sort(replace(min(cons(n, x)), n, x)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(cons(0, nil))
min(cons(s(x0), nil))
min(cons(x0, cons(x1, x2)))
if_min(true, cons(x0, cons(x1, x2)))
if_min(false, cons(x0, cons(x1, x2)))
replace(x0, x1, nil)
replace(x0, x1, cons(x2, x3))
if_replace(true, x0, x1, cons(x2, x3))
if_replace(false, x0, x1, cons(x2, x3))
sort(nil)
sort(cons(x0, x1))

We have to consider all minimal (P,Q,R)-chains.

(30) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(31) TRUE