(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(nil) → 0
min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
if_min(true, x, y, m) → m
if_min(false, x, y, m) → minIter(x, y, m)
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(nil, nil) → nil
minsort(add(n, x), y) → if_minsort(eq(n, min(add(n, x))), add(n, x), y)
if_minsort(true, add(n, x), y) → add(n, minsort(app(rm(n, x), y), nil))
if_minsort(false, add(n, x), y) → minsort(x, add(n, y))

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(nil) → 0
min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
if_min(true, x, y, m) → m
if_min(false, x, y, m) → minIter(x, y, m)
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(nil, nil) → nil
minsort(add(n, x), y) → if_minsort(eq(n, min(add(n, x))), add(n, x), y)
if_minsort(true, add(n, x), y) → add(n, minsort(app(rm(n, x), y), nil))
if_minsort(false, add(n, x), y) → minsort(x, add(n, y))

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(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, x)) → MINITER(add(n, x), add(n, x), 0)
MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m))
MINITER(add(n, x), y, m) → IF_MIN(le(n, m), x, y, m)
MINITER(add(n, x), y, m) → LE(n, m)
IF_MIN(false, x, y, m) → MINITER(x, y, m)
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(add(n, x), y) → IF_MINSORT(eq(n, min(add(n, x))), add(n, x), y)
MINSORT(add(n, x), y) → EQ(n, min(add(n, x)))
MINSORT(add(n, x), y) → MIN(add(n, x))
IF_MINSORT(true, add(n, x), y) → MINSORT(app(rm(n, x), y), nil)
IF_MINSORT(true, add(n, x), y) → APP(rm(n, x), y)
IF_MINSORT(true, add(n, x), y) → RM(n, x)
IF_MINSORT(false, add(n, x), y) → MINSORT(x, add(n, 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(nil) → 0
min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
if_min(true, x, y, m) → m
if_min(false, x, y, m) → minIter(x, y, m)
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(nil, nil) → nil
minsort(add(n, x), y) → if_minsort(eq(n, min(add(n, x))), add(n, x), y)
if_minsort(true, add(n, x), y) → add(n, minsort(app(rm(n, x), y), nil))
if_minsort(false, add(n, x), y) → minsort(x, add(n, y))

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(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 7 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(nil) → 0
min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
if_min(true, x, y, m) → m
if_min(false, x, y, m) → minIter(x, y, m)
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(nil, nil) → nil
minsort(add(n, x), y) → if_minsort(eq(n, min(add(n, x))), add(n, x), y)
if_minsort(true, add(n, x), y) → add(n, minsort(app(rm(n, x), y), nil))
if_minsort(false, add(n, x), y) → minsort(x, add(n, y))

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(8) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(9) Obligation:

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

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

R is empty.
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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(10) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

(11) Obligation:

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

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

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

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • APP(add(n, x), y) → APP(x, y)
    The graph contains the following edges 1 > 1, 2 >= 2

(13) TRUE

(14) 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(nil) → 0
min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
if_min(true, x, y, m) → m
if_min(false, x, y, m) → minIter(x, y, m)
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(nil, nil) → nil
minsort(add(n, x), y) → if_minsort(eq(n, min(add(n, x))), add(n, x), y)
if_minsort(true, add(n, x), y) → add(n, minsort(app(rm(n, x), y), nil))
if_minsort(false, add(n, x), y) → minsort(x, add(n, y))

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(15) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(16) Obligation:

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

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

R is empty.
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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(17) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

(18) Obligation:

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

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

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

(19) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LE(s(x), s(y)) → LE(x, y)
    The graph contains the following edges 1 > 1, 2 > 2

(20) TRUE

(21) Obligation:

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

MINITER(add(n, x), y, m) → IF_MIN(le(n, m), x, y, m)
IF_MIN(false, x, y, m) → MINITER(x, y, m)
MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m))

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(nil) → 0
min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
if_min(true, x, y, m) → m
if_min(false, x, y, m) → minIter(x, y, m)
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(nil, nil) → nil
minsort(add(n, x), y) → if_minsort(eq(n, min(add(n, x))), add(n, x), y)
if_minsort(true, add(n, x), y) → add(n, minsort(app(rm(n, x), y), nil))
if_minsort(false, add(n, x), y) → minsort(x, add(n, y))

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(22) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(23) Obligation:

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

MINITER(add(n, x), y, m) → IF_MIN(le(n, m), x, y, m)
IF_MIN(false, x, y, m) → MINITER(x, y, m)
MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m))

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)

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(24) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

(25) Obligation:

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

MINITER(add(n, x), y, m) → IF_MIN(le(n, m), x, y, m)
IF_MIN(false, x, y, m) → MINITER(x, y, m)
MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m))

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)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(26) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule MINITER(add(n, x), y, m) → IF_MIN(le(n, m), x, y, m) at position [0] we obtained the following new rules [LPAR04]:

MINITER(add(0, y1), y2, x0) → IF_MIN(true, y1, y2, x0)
MINITER(add(s(x0), y1), y2, 0) → IF_MIN(false, y1, y2, 0)
MINITER(add(s(x0), y1), y2, s(x1)) → IF_MIN(le(x0, x1), y1, y2, s(x1))

(27) Obligation:

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

IF_MIN(false, x, y, m) → MINITER(x, y, m)
MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m))
MINITER(add(0, y1), y2, x0) → IF_MIN(true, y1, y2, x0)
MINITER(add(s(x0), y1), y2, 0) → IF_MIN(false, y1, y2, 0)
MINITER(add(s(x0), y1), y2, s(x1)) → IF_MIN(le(x0, x1), y1, y2, s(x1))

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)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(28) DependencyGraphProof (EQUIVALENT transformation)

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

(29) Obligation:

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

MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m))
MINITER(add(s(x0), y1), y2, s(x1)) → IF_MIN(le(x0, x1), y1, y2, s(x1))
IF_MIN(false, x, y, m) → MINITER(x, y, m)
MINITER(add(s(x0), y1), y2, 0) → IF_MIN(false, y1, y2, 0)

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)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(30) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF_MIN(false, x, y, m) → MINITER(x, y, m) we obtained the following new rules [LPAR04]:

IF_MIN(false, z1, z2, s(z3)) → MINITER(z1, z2, s(z3))
IF_MIN(false, z1, z2, 0) → MINITER(z1, z2, 0)

(31) Obligation:

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

MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m))
MINITER(add(s(x0), y1), y2, s(x1)) → IF_MIN(le(x0, x1), y1, y2, s(x1))
MINITER(add(s(x0), y1), y2, 0) → IF_MIN(false, y1, y2, 0)
IF_MIN(false, z1, z2, s(z3)) → MINITER(z1, z2, s(z3))
IF_MIN(false, z1, z2, 0) → MINITER(z1, z2, 0)

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)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(32) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs.

(33) Complex Obligation (AND)

(34) Obligation:

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

MINITER(add(s(x0), y1), y2, s(x1)) → IF_MIN(le(x0, x1), y1, y2, s(x1))
IF_MIN(false, z1, z2, s(z3)) → MINITER(z1, z2, s(z3))
MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m))

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)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(35) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m)) we obtained the following new rules [LPAR04]:

MINITER(nil, add(x0, x1), s(z2)) → MINITER(add(x0, x1), add(x0, x1), s(s(z2)))

(36) Obligation:

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

MINITER(add(s(x0), y1), y2, s(x1)) → IF_MIN(le(x0, x1), y1, y2, s(x1))
IF_MIN(false, z1, z2, s(z3)) → MINITER(z1, z2, s(z3))
MINITER(nil, add(x0, x1), s(z2)) → MINITER(add(x0, x1), add(x0, x1), s(s(z2)))

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)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(37) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF_MIN(false, z1, z2, s(z3)) → MINITER(z1, z2, s(z3)) we obtained the following new rules [LPAR04]:

IF_MIN(false, add(s(y_0), y_1), x1, s(x2)) → MINITER(add(s(y_0), y_1), x1, s(x2))
IF_MIN(false, nil, add(y_0, y_1), s(x2)) → MINITER(nil, add(y_0, y_1), s(x2))

(38) Obligation:

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

MINITER(add(s(x0), y1), y2, s(x1)) → IF_MIN(le(x0, x1), y1, y2, s(x1))
MINITER(nil, add(x0, x1), s(z2)) → MINITER(add(x0, x1), add(x0, x1), s(s(z2)))
IF_MIN(false, add(s(y_0), y_1), x1, s(x2)) → MINITER(add(s(y_0), y_1), x1, s(x2))
IF_MIN(false, nil, add(y_0, y_1), s(x2)) → MINITER(nil, add(y_0, y_1), s(x2))

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)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(39) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule MINITER(add(s(x0), y1), y2, s(x1)) → IF_MIN(le(x0, x1), y1, y2, s(x1)) we obtained the following new rules [LPAR04]:

MINITER(add(s(x0), add(s(y_1), y_2)), x2, s(x3)) → IF_MIN(le(x0, x3), add(s(y_1), y_2), x2, s(x3))
MINITER(add(s(x0), nil), add(y_1, y_2), s(x3)) → IF_MIN(le(x0, x3), nil, add(y_1, y_2), s(x3))

(40) Obligation:

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

MINITER(nil, add(x0, x1), s(z2)) → MINITER(add(x0, x1), add(x0, x1), s(s(z2)))
IF_MIN(false, add(s(y_0), y_1), x1, s(x2)) → MINITER(add(s(y_0), y_1), x1, s(x2))
IF_MIN(false, nil, add(y_0, y_1), s(x2)) → MINITER(nil, add(y_0, y_1), s(x2))
MINITER(add(s(x0), add(s(y_1), y_2)), x2, s(x3)) → IF_MIN(le(x0, x3), add(s(y_1), y_2), x2, s(x3))
MINITER(add(s(x0), nil), add(y_1, y_2), s(x3)) → IF_MIN(le(x0, x3), nil, add(y_1, y_2), s(x3))

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)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(41) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule MINITER(nil, add(x0, x1), s(z2)) → MINITER(add(x0, x1), add(x0, x1), s(s(z2))) we obtained the following new rules [LPAR04]:

MINITER(nil, add(s(y_0), add(s(y_1), y_2)), s(x2)) → MINITER(add(s(y_0), add(s(y_1), y_2)), add(s(y_0), add(s(y_1), y_2)), s(s(x2)))
MINITER(nil, add(s(y_0), nil), s(x2)) → MINITER(add(s(y_0), nil), add(s(y_0), nil), s(s(x2)))

(42) Obligation:

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

IF_MIN(false, add(s(y_0), y_1), x1, s(x2)) → MINITER(add(s(y_0), y_1), x1, s(x2))
IF_MIN(false, nil, add(y_0, y_1), s(x2)) → MINITER(nil, add(y_0, y_1), s(x2))
MINITER(add(s(x0), add(s(y_1), y_2)), x2, s(x3)) → IF_MIN(le(x0, x3), add(s(y_1), y_2), x2, s(x3))
MINITER(add(s(x0), nil), add(y_1, y_2), s(x3)) → IF_MIN(le(x0, x3), nil, add(y_1, y_2), s(x3))
MINITER(nil, add(s(y_0), add(s(y_1), y_2)), s(x2)) → MINITER(add(s(y_0), add(s(y_1), y_2)), add(s(y_0), add(s(y_1), y_2)), s(s(x2)))
MINITER(nil, add(s(y_0), nil), s(x2)) → MINITER(add(s(y_0), nil), add(s(y_0), nil), s(s(x2)))

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)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(43) MNOCProof (EQUIVALENT transformation)

We use the modular non-overlap check [FROCOS05] to decrease Q to the empty set.

(44) Obligation:

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

IF_MIN(false, add(s(y_0), y_1), x1, s(x2)) → MINITER(add(s(y_0), y_1), x1, s(x2))
IF_MIN(false, nil, add(y_0, y_1), s(x2)) → MINITER(nil, add(y_0, y_1), s(x2))
MINITER(add(s(x0), add(s(y_1), y_2)), x2, s(x3)) → IF_MIN(le(x0, x3), add(s(y_1), y_2), x2, s(x3))
MINITER(add(s(x0), nil), add(y_1, y_2), s(x3)) → IF_MIN(le(x0, x3), nil, add(y_1, y_2), s(x3))
MINITER(nil, add(s(y_0), add(s(y_1), y_2)), s(x2)) → MINITER(add(s(y_0), add(s(y_1), y_2)), add(s(y_0), add(s(y_1), y_2)), s(s(x2)))
MINITER(nil, add(s(y_0), nil), s(x2)) → MINITER(add(s(y_0), nil), add(s(y_0), nil), s(s(x2)))

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)

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

(45) Obligation:

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

MINITER(add(s(x0), y1), y2, 0) → IF_MIN(false, y1, y2, 0)
IF_MIN(false, z1, z2, 0) → MINITER(z1, z2, 0)

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)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(46) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(47) Obligation:

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

MINITER(add(s(x0), y1), y2, 0) → IF_MIN(false, y1, y2, 0)
IF_MIN(false, z1, z2, 0) → MINITER(z1, z2, 0)

R is empty.
The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(48) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

(49) Obligation:

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

MINITER(add(s(x0), y1), y2, 0) → IF_MIN(false, y1, y2, 0)
IF_MIN(false, z1, z2, 0) → MINITER(z1, z2, 0)

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

(50) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule IF_MIN(false, z1, z2, 0) → MINITER(z1, z2, 0) we obtained the following new rules [LPAR04]:

IF_MIN(false, add(s(y_0), y_1), x1, 0) → MINITER(add(s(y_0), y_1), x1, 0)

(51) Obligation:

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

MINITER(add(s(x0), y1), y2, 0) → IF_MIN(false, y1, y2, 0)
IF_MIN(false, add(s(y_0), y_1), x1, 0) → MINITER(add(s(y_0), y_1), x1, 0)

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

(52) ForwardInstantiation (EQUIVALENT transformation)

By forward instantiating [JAR06] the rule MINITER(add(s(x0), y1), y2, 0) → IF_MIN(false, y1, y2, 0) we obtained the following new rules [LPAR04]:

MINITER(add(s(x0), add(s(y_0), y_1)), x2, 0) → IF_MIN(false, add(s(y_0), y_1), x2, 0)

(53) Obligation:

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

IF_MIN(false, add(s(y_0), y_1), x1, 0) → MINITER(add(s(y_0), y_1), x1, 0)
MINITER(add(s(x0), add(s(y_0), y_1)), x2, 0) → IF_MIN(false, add(s(y_0), y_1), x2, 0)

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

(54) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • MINITER(add(s(x0), add(s(y_0), y_1)), x2, 0) → IF_MIN(false, add(s(y_0), y_1), x2, 0)
    The graph contains the following edges 1 > 2, 2 >= 3, 3 >= 4

  • IF_MIN(false, add(s(y_0), y_1), x1, 0) → MINITER(add(s(y_0), y_1), x1, 0)
    The graph contains the following edges 2 >= 1, 3 >= 2, 4 >= 3

(55) TRUE

(56) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(57) Obligation:

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

MINITER(add(n, x), y, m) → IF_MIN(le(n, m), x, y, m)
IF_MIN(false, x, y, m) → MINITER(x, y, m)
MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m))

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)

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(58) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

(59) Obligation:

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

MINITER(add(n, x), y, m) → IF_MIN(le(n, m), x, y, m)
IF_MIN(false, x, y, m) → MINITER(x, y, m)
MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m))

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)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

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

(60) MNOCProof (EQUIVALENT transformation)

We use the modular non-overlap check [FROCOS05] to decrease Q to the empty set.

(61) Obligation:

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

MINITER(add(n, x), y, m) → IF_MIN(le(n, m), x, y, m)
IF_MIN(false, x, y, m) → MINITER(x, y, m)
MINITER(nil, add(n, y), m) → MINITER(add(n, y), add(n, y), s(m))

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)

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

(62) 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(nil) → 0
min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
if_min(true, x, y, m) → m
if_min(false, x, y, m) → minIter(x, y, m)
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(nil, nil) → nil
minsort(add(n, x), y) → if_minsort(eq(n, min(add(n, x))), add(n, x), y)
if_minsort(true, add(n, x), y) → add(n, minsort(app(rm(n, x), y), nil))
if_minsort(false, add(n, x), y) → minsort(x, add(n, y))

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(63) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(64) Obligation:

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

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

R is empty.
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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(65) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

(66) Obligation:

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

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

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

(67) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • EQ(s(x), s(y)) → EQ(x, y)
    The graph contains the following edges 1 > 1, 2 > 2

(68) TRUE

(69) 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(nil) → 0
min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
if_min(true, x, y, m) → m
if_min(false, x, y, m) → minIter(x, y, m)
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(nil, nil) → nil
minsort(add(n, x), y) → if_minsort(eq(n, min(add(n, x))), add(n, x), y)
if_minsort(true, add(n, x), y) → add(n, minsort(app(rm(n, x), y), nil))
if_minsort(false, add(n, x), y) → minsort(x, add(n, y))

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(70) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(71) 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)

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(72) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

(73) 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)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))

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

(74) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • RM(n, add(m, x)) → IF_RM(eq(n, m), n, add(m, x))
    The graph contains the following edges 1 >= 2, 2 >= 3

  • IF_RM(true, n, add(m, x)) → RM(n, x)
    The graph contains the following edges 2 >= 1, 3 > 2

  • IF_RM(false, n, add(m, x)) → RM(n, x)
    The graph contains the following edges 2 >= 1, 3 > 2

(75) TRUE

(76) Obligation:

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

IF_MINSORT(true, add(n, x), y) → MINSORT(app(rm(n, x), y), nil)
MINSORT(add(n, x), y) → IF_MINSORT(eq(n, min(add(n, x))), add(n, x), y)
IF_MINSORT(false, add(n, x), y) → MINSORT(x, add(n, 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(nil) → 0
min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
if_min(true, x, y, m) → m
if_min(false, x, y, m) → minIter(x, y, m)
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(nil, nil) → nil
minsort(add(n, x), y) → if_minsort(eq(n, min(add(n, x))), add(n, x), y)
if_minsort(true, add(n, x), y) → add(n, minsort(app(rm(n, x), y), nil))
if_minsort(false, add(n, x), y) → minsort(x, add(n, y))

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(77) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(78) Obligation:

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

IF_MINSORT(true, add(n, x), y) → MINSORT(app(rm(n, x), y), nil)
MINSORT(add(n, x), y) → IF_MINSORT(eq(n, min(add(n, x))), add(n, x), y)
IF_MINSORT(false, add(n, x), y) → MINSORT(x, add(n, y))

The TRS R consists of the following rules:

min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if_min(false, x, y, m) → minIter(x, y, m)
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
if_min(true, x, y, m) → m
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(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))
app(nil, x0)
app(add(x0, x1), x2)
min(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, 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(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

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

(79) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
minsort(nil, nil)
minsort(add(x0, x1), x2)
if_minsort(true, add(x0, x1), x2)
if_minsort(false, add(x0, x1), x2)

(80) Obligation:

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

IF_MINSORT(true, add(n, x), y) → MINSORT(app(rm(n, x), y), nil)
MINSORT(add(n, x), y) → IF_MINSORT(eq(n, min(add(n, x))), add(n, x), y)
IF_MINSORT(false, add(n, x), y) → MINSORT(x, add(n, y))

The TRS R consists of the following rules:

min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if_min(false, x, y, m) → minIter(x, y, m)
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
if_min(true, x, y, m) → m
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(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))
app(nil, x0)
app(add(x0, x1), x2)
min(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, x1, x2)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

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

(81) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


IF_MINSORT(true, add(n, x), y) → MINSORT(app(rm(n, x), y), nil)
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:

POL(IF_MINSORT(x1, x2, x3)) =
/0\
\0/
+
/00\
\00/
·x1 +
/11\
\11/
·x2 +
/01\
\01/
·x3

POL(true) =
/0\
\1/

POL(add(x1, x2)) =
/1\
\1/
+
/00\
\10/
·x1 +
/00\
\01/
·x2

POL(MINSORT(x1, x2)) =
/1\
\1/
+
/01\
\01/
·x1 +
/01\
\01/
·x2

POL(app(x1, x2)) =
/1\
\0/
+
/01\
\01/
·x1 +
/11\
\01/
·x2

POL(rm(x1, x2)) =
/1\
\0/
+
/10\
\00/
·x1 +
/01\
\01/
·x2

POL(nil) =
/0\
\0/

POL(eq(x1, x2)) =
/0\
\0/
+
/00\
\00/
·x1 +
/00\
\00/
·x2

POL(min(x1)) =
/0\
\0/
+
/00\
\00/
·x1

POL(false) =
/1\
\0/

POL(0) =
/0\
\0/

POL(s(x1)) =
/0\
\0/
+
/00\
\00/
·x1

POL(minIter(x1, x2, x3)) =
/0\
\0/
+
/01\
\00/
·x1 +
/00\
\00/
·x2 +
/01\
\00/
·x3

POL(if_min(x1, x2, x3, x4)) =
/0\
\1/
+
/00\
\11/
·x1 +
/11\
\10/
·x2 +
/11\
\11/
·x3 +
/10\
\01/
·x4

POL(le(x1, x2)) =
/0\
\0/
+
/00\
\00/
·x1 +
/01\
\01/
·x2

POL(if_rm(x1, x2, x3)) =
/0\
\0/
+
/00\
\00/
·x1 +
/10\
\00/
·x2 +
/11\
\01/
·x3

The following usable rules [FROCOS05] were oriented:

rm(n, nil) → nil
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
app(add(n, x), y) → add(n, app(x, y))
app(nil, y) → y
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))

(82) Obligation:

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

MINSORT(add(n, x), y) → IF_MINSORT(eq(n, min(add(n, x))), add(n, x), y)
IF_MINSORT(false, add(n, x), y) → MINSORT(x, add(n, y))

The TRS R consists of the following rules:

min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if_min(false, x, y, m) → minIter(x, y, m)
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
if_min(true, x, y, m) → m
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(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))
app(nil, x0)
app(add(x0, x1), x2)
min(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, x1, x2)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

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

(83) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(84) Obligation:

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

MINSORT(add(n, x), y) → IF_MINSORT(eq(n, min(add(n, x))), add(n, x), y)
IF_MINSORT(false, add(n, x), y) → MINSORT(x, add(n, y))

The TRS R consists of the following rules:

min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if_min(false, x, y, m) → minIter(x, y, m)
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
if_min(true, x, y, m) → m

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, x1, x2)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

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

(85) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

app(nil, x0)
app(add(x0, x1), x2)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

(86) Obligation:

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

MINSORT(add(n, x), y) → IF_MINSORT(eq(n, min(add(n, x))), add(n, x), y)
IF_MINSORT(false, add(n, x), y) → MINSORT(x, add(n, y))

The TRS R consists of the following rules:

min(add(n, x)) → minIter(add(n, x), add(n, x), 0)
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if_min(false, x, y, m) → minIter(x, y, m)
minIter(add(n, x), y, m) → if_min(le(n, m), x, y, m)
minIter(nil, add(n, y), m) → minIter(add(n, y), add(n, y), s(m))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
if_min(true, x, y, m) → m

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(nil)
min(add(x0, x1))
minIter(nil, add(x0, x1), x2)
minIter(add(x0, x1), x2, x3)
if_min(true, x0, x1, x2)
if_min(false, x0, x1, x2)

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

(87) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • IF_MINSORT(false, add(n, x), y) → MINSORT(x, add(n, y))
    The graph contains the following edges 2 > 1

  • MINSORT(add(n, x), y) → IF_MINSORT(eq(n, min(add(n, x))), add(n, x), y)
    The graph contains the following edges 1 >= 2, 2 >= 3

(88) TRUE