(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(x2)
s(x1)  =  s(x1)

Recursive Path Order [RPO].
Precedence:
s1 > LE1

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)  =  le
true  =  true
false  =  false
s(x1)  =  s
0  =  0

Recursive Path Order [RPO].
Precedence:
le > true

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(x2)
s(x1)  =  s(x1)

Recursive Path Order [RPO].
Precedence:
s1 > EQ1

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)  =  IF_REPLACE(x1, x4)
eq(x1, x2)  =  eq(x2)
false  =  false
0  =  0
s(x1)  =  s(x1)
true  =  true

Recursive Path Order [RPO].
Precedence:
cons2 > REPLACE1 > IFREPLACE2
cons2 > eq1 > true
0 > false
0 > true
s1 > eq1 > true
s1 > false

The following usable rules [FROCOS05] were oriented:

eq(0, s(m)) → false
eq(0, 0) → true
eq(s(n), s(m)) → eq(n, m)
eq(s(n), 0) → false

(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(x1)
if_min(x1, x2)  =  if_min(x1, x2)
false  =  false
le(x1, x2)  =  le(x1, x2)
true  =  true
s(x1)  =  s
nil  =  nil
if_replace(x1, x2, x3, x4)  =  x4
eq(x1, x2)  =  eq(x1)
0  =  0

Recursive Path Order [RPO].
Precedence:
cons1 > ifmin2
cons1 > le2
min1 > ifmin2
min1 > le2
s > le2
eq1 > true
0 > true

The following usable rules [FROCOS05] were oriented:

replace(n, m, cons(k, x)) → if_replace(eq(n, k), n, m, cons(k, x))
replace(n, m, nil) → nil
if_replace(false, n, m, cons(k, x)) → cons(k, replace(n, m, x))
if_replace(true, n, m, cons(k, x)) → cons(m, 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