(0) Obligation:

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

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(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:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, 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:

EQ(s(x), s(y)) → EQ(x, y)
LE(s(x), s(y)) → LE(x, y)
APP(add(n, x), y) → APP(x, y)
MIN(add(n, add(m, x))) → IF_MIN(le(n, m), add(n, add(m, x)))
MIN(add(n, add(m, x))) → LE(n, m)
IF_MIN(true, add(n, add(m, x))) → MIN(add(n, x))
IF_MIN(false, add(n, add(m, x))) → MIN(add(m, x))
RM(n, add(m, x)) → IF_RM(eq(n, m), n, add(m, x))
RM(n, add(m, x)) → EQ(n, m)
IF_RM(true, n, add(m, x)) → RM(n, x)
IF_RM(false, n, add(m, x)) → RM(n, x)
MINSORT(x) → MINS(x, nil, nil)
MINS(x, y, z) → IF(null(x), x, y, z)
MINS(x, y, z) → NULL(x)
IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF(false, x, y, z) → EQ(head(x), min(x))
IF(false, x, y, z) → HEAD(x)
IF(false, x, y, z) → MIN(x)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
IF2(true, x, y, z) → APP(rm(head(x), tail(x)), y)
IF2(true, x, y, z) → RM(head(x), tail(x))
IF2(true, x, y, z) → HEAD(x)
IF2(true, x, y, z) → TAIL(x)
IF2(true, x, y, z) → APP(z, add(head(x), nil))
IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z)
IF2(false, x, y, z) → TAIL(x)
IF2(false, x, y, z) → HEAD(x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, 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 6 SCCs with 14 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

APP(add(n, x), y) → APP(x, y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

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.


APP(add(n, x), y) → APP(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Quasi-Precedence:
add2 > APP2

Status:
add2: multiset
APP2: [2,1]


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(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

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:

LE(s(x), s(y)) → LE(x, y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

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.


LE(s(x), s(y)) → LE(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Quasi-Precedence:
[LE2, s1]

Status:
s1: [1]
LE2: [1,2]


The following usable rules [FROCOS05] were oriented: none

(14) Obligation:

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

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

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

(15) PisEmptyProof (EQUIVALENT transformation)

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

(16) TRUE

(17) Obligation:

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

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

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

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.


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

Recursive path order with status [RPO].
Quasi-Precedence:
[MIN1, add1, le, true, 0] > IFMIN2 > false

Status:
add1: multiset
IFMIN2: multiset
true: multiset
MIN1: multiset
false: multiset
0: multiset
le: multiset


The following usable rules [FROCOS05] were oriented:

le(s(x), 0) → false
le(0, y) → true
le(s(x), s(y)) → le(x, y)

(19) Obligation:

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

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

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:

EQ(s(x), s(y)) → EQ(x, y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

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.


EQ(s(x), s(y)) → EQ(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Recursive path order with status [RPO].
Quasi-Precedence:
[EQ2, s1]

Status:
s1: [1]
EQ2: [1,2]


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(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

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:

RM(n, add(m, x)) → IF_RM(eq(n, m), n, add(m, x))
IF_RM(true, n, add(m, x)) → RM(n, x)
IF_RM(false, n, add(m, x)) → RM(n, x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

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.


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

Recursive path order with status [RPO].
Quasi-Precedence:
add2 > [eq, s]
[false, 0] > true > [eq, s]

Status:
eq: multiset
add2: [2,1]
true: multiset
false: multiset
s: multiset
0: multiset


The following usable rules [FROCOS05] were oriented: none

(29) Obligation:

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

RM(n, add(m, x)) → IF_RM(eq(n, m), n, add(m, x))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

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

(30) DependencyGraphProof (EQUIVALENT transformation)

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

(31) TRUE

(32) Obligation:

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

IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
MINS(x, y, z) → IF(null(x), x, y, z)
IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

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))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

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