(0) Obligation:

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

sort(l) → st(0, l)
st(n, l) → cond1(member(n, l), n, l)
cond1(true, n, l) → cons(n, st(s(n), l))
cond1(false, n, l) → cond2(gt(n, max(l)), n, l)
cond2(true, n, l) → nil
cond2(false, n, l) → st(s(n), l)
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
or(x, true) → true
or(x, false) → x
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
if(true, u, v) → u
if(false, u, v) → v

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:

sort(l) → st(0, l)
st(n, l) → cond1(member(n, l), n, l)
cond1(true, n, l) → cons(n, st(s(n), l))
cond1(false, n, l) → cond2(gt(n, max(l)), n, l)
cond2(true, n, l) → nil
cond2(false, n, l) → st(s(n), l)
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
or(x, true) → true
or(x, false) → x
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
if(true, u, v) → u
if(false, u, v) → v

The set Q consists of the following terms:

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, 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:

SORT(l) → ST(0, l)
ST(n, l) → COND1(member(n, l), n, l)
ST(n, l) → MEMBER(n, l)
COND1(true, n, l) → ST(s(n), l)
COND1(false, n, l) → COND2(gt(n, max(l)), n, l)
COND1(false, n, l) → GT(n, max(l))
COND1(false, n, l) → MAX(l)
COND2(false, n, l) → ST(s(n), l)
MEMBER(n, cons(m, l)) → OR(equal(n, m), member(n, l))
MEMBER(n, cons(m, l)) → EQUAL(n, m)
MEMBER(n, cons(m, l)) → MEMBER(n, l)
EQUAL(s(x), s(y)) → EQUAL(x, y)
GT(s(u), s(v)) → GT(u, v)
MAX(cons(u, l)) → IF(gt(u, max(l)), u, max(l))
MAX(cons(u, l)) → GT(u, max(l))
MAX(cons(u, l)) → MAX(l)

The TRS R consists of the following rules:

sort(l) → st(0, l)
st(n, l) → cond1(member(n, l), n, l)
cond1(true, n, l) → cons(n, st(s(n), l))
cond1(false, n, l) → cond2(gt(n, max(l)), n, l)
cond2(true, n, l) → nil
cond2(false, n, l) → st(s(n), l)
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
or(x, true) → true
or(x, false) → x
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
if(true, u, v) → u
if(false, u, v) → v

The set Q consists of the following terms:

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, 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 8 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

GT(s(u), s(v)) → GT(u, v)

The TRS R consists of the following rules:

sort(l) → st(0, l)
st(n, l) → cond1(member(n, l), n, l)
cond1(true, n, l) → cons(n, st(s(n), l))
cond1(false, n, l) → cond2(gt(n, max(l)), n, l)
cond2(true, n, l) → nil
cond2(false, n, l) → st(s(n), l)
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
or(x, true) → true
or(x, false) → x
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
if(true, u, v) → u
if(false, u, v) → v

The set Q consists of the following terms:

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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:

GT(s(u), s(v)) → GT(u, v)

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

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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].

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

(11) Obligation:

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

GT(s(u), s(v)) → GT(u, v)

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:

  • GT(s(u), s(v)) → GT(u, v)
    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:

MAX(cons(u, l)) → MAX(l)

The TRS R consists of the following rules:

sort(l) → st(0, l)
st(n, l) → cond1(member(n, l), n, l)
cond1(true, n, l) → cons(n, st(s(n), l))
cond1(false, n, l) → cond2(gt(n, max(l)), n, l)
cond2(true, n, l) → nil
cond2(false, n, l) → st(s(n), l)
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
or(x, true) → true
or(x, false) → x
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
if(true, u, v) → u
if(false, u, v) → v

The set Q consists of the following terms:

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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:

MAX(cons(u, l)) → MAX(l)

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

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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].

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

(18) Obligation:

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

MAX(cons(u, l)) → MAX(l)

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:

  • MAX(cons(u, l)) → MAX(l)
    The graph contains the following edges 1 > 1

(20) TRUE

(21) Obligation:

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

EQUAL(s(x), s(y)) → EQUAL(x, y)

The TRS R consists of the following rules:

sort(l) → st(0, l)
st(n, l) → cond1(member(n, l), n, l)
cond1(true, n, l) → cons(n, st(s(n), l))
cond1(false, n, l) → cond2(gt(n, max(l)), n, l)
cond2(true, n, l) → nil
cond2(false, n, l) → st(s(n), l)
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
or(x, true) → true
or(x, false) → x
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
if(true, u, v) → u
if(false, u, v) → v

The set Q consists of the following terms:

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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:

EQUAL(s(x), s(y)) → EQUAL(x, y)

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

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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].

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

(25) Obligation:

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

EQUAL(s(x), s(y)) → EQUAL(x, y)

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

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

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

(27) TRUE

(28) Obligation:

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

MEMBER(n, cons(m, l)) → MEMBER(n, l)

The TRS R consists of the following rules:

sort(l) → st(0, l)
st(n, l) → cond1(member(n, l), n, l)
cond1(true, n, l) → cons(n, st(s(n), l))
cond1(false, n, l) → cond2(gt(n, max(l)), n, l)
cond2(true, n, l) → nil
cond2(false, n, l) → st(s(n), l)
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
or(x, true) → true
or(x, false) → x
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
if(true, u, v) → u
if(false, u, v) → v

The set Q consists of the following terms:

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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

(29) 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.

(30) Obligation:

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

MEMBER(n, cons(m, l)) → MEMBER(n, l)

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

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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

(31) 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].

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

(32) Obligation:

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

MEMBER(n, cons(m, l)) → MEMBER(n, l)

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

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

  • MEMBER(n, cons(m, l)) → MEMBER(n, l)
    The graph contains the following edges 1 >= 1, 2 > 2

(34) TRUE

(35) Obligation:

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

COND1(true, n, l) → ST(s(n), l)
ST(n, l) → COND1(member(n, l), n, l)
COND1(false, n, l) → COND2(gt(n, max(l)), n, l)
COND2(false, n, l) → ST(s(n), l)

The TRS R consists of the following rules:

sort(l) → st(0, l)
st(n, l) → cond1(member(n, l), n, l)
cond1(true, n, l) → cons(n, st(s(n), l))
cond1(false, n, l) → cond2(gt(n, max(l)), n, l)
cond2(true, n, l) → nil
cond2(false, n, l) → st(s(n), l)
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
or(x, true) → true
or(x, false) → x
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
if(true, u, v) → u
if(false, u, v) → v

The set Q consists of the following terms:

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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

(36) 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.

(37) Obligation:

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

COND1(true, n, l) → ST(s(n), l)
ST(n, l) → COND1(member(n, l), n, l)
COND1(false, n, l) → COND2(gt(n, max(l)), n, l)
COND2(false, n, l) → ST(s(n), l)

The TRS R consists of the following rules:

max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
if(true, u, v) → u
if(false, u, v) → v
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
or(x, true) → true
or(x, false) → x

The set Q consists of the following terms:

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)
member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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

(38) 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].

sort(x0)
st(x0, x1)
cond1(true, x0, x1)
cond1(false, x0, x1)
cond2(true, x0, x1)
cond2(false, x0, x1)

(39) Obligation:

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

COND1(true, n, l) → ST(s(n), l)
ST(n, l) → COND1(member(n, l), n, l)
COND1(false, n, l) → COND2(gt(n, max(l)), n, l)
COND2(false, n, l) → ST(s(n), l)

The TRS R consists of the following rules:

max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
if(true, u, v) → u
if(false, u, v) → v
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
or(x, true) → true
or(x, false) → x

The set Q consists of the following terms:

member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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

(40) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule ST(n, l) → COND1(member(n, l), n, l) we obtained the following new rules [LPAR04]:

ST(s(z0), z1) → COND1(member(s(z0), z1), s(z0), z1)

(41) Obligation:

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

COND1(true, n, l) → ST(s(n), l)
COND1(false, n, l) → COND2(gt(n, max(l)), n, l)
COND2(false, n, l) → ST(s(n), l)
ST(s(z0), z1) → COND1(member(s(z0), z1), s(z0), z1)

The TRS R consists of the following rules:

max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
if(true, u, v) → u
if(false, u, v) → v
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
or(x, true) → true
or(x, false) → x

The set Q consists of the following terms:

member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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

(42) NonInfProof (EQUIVALENT transformation)

The DP Problem is simplified using the Induction Calculus [NONINF] with the following steps:
Note that final constraints are written in bold face.


For Pair COND1(true, n, l) → ST(s(n), l) the following chains were created:
  • We consider the chain ST(n, l) → COND1(member(n, l), n, l), COND1(true, n, l) → ST(s(n), l) which results in the following constraint:

    (1)    (COND1(member(x2, x3), x2, x3)=COND1(true, x4, x5) ⇒ COND1(true, x4, x5)≥ST(s(x4), x5))



    We simplified constraint (1) using rules (I), (II), (III) which results in the following new constraint:

    (2)    (member(x2, x3)=trueCOND1(true, x2, x3)≥ST(s(x2), x3))



    We simplified constraint (2) using rule (V) (with possible (I) afterwards) using induction on member(x2, x3)=true which results in the following new constraint:

    (3)    (or(equal(x45, x44), member(x45, x43))=true∧(member(x45, x43)=trueCOND1(true, x45, x43)≥ST(s(x45), x43)) ⇒ COND1(true, x45, cons(x44, x43))≥ST(s(x45), cons(x44, x43)))



    We simplified constraint (3) using rule (VII) which results in the following new constraint:

    (4)    (equal(x45, x44)=x46member(x45, x43)=x47or(x46, x47)=true∧(member(x45, x43)=trueCOND1(true, x45, x43)≥ST(s(x45), x43)) ⇒ COND1(true, x45, cons(x44, x43))≥ST(s(x45), cons(x44, x43)))



    We simplified constraint (4) using rule (V) (with possible (I) afterwards) using induction on or(x46, x47)=true which results in the following new constraints:

    (5)    (true=trueequal(x45, x44)=x48member(x45, x43)=true∧(member(x45, x43)=trueCOND1(true, x45, x43)≥ST(s(x45), x43)) ⇒ COND1(true, x45, cons(x44, x43))≥ST(s(x45), cons(x44, x43)))


    (6)    (x49=trueequal(x45, x44)=x49member(x45, x43)=false∧(member(x45, x43)=trueCOND1(true, x45, x43)≥ST(s(x45), x43)) ⇒ COND1(true, x45, cons(x44, x43))≥ST(s(x45), cons(x44, x43)))



    We simplified constraint (5) using rules (I), (II) which results in the following new constraint:

    (7)    (equal(x45, x44)=x48member(x45, x43)=true∧(member(x45, x43)=trueCOND1(true, x45, x43)≥ST(s(x45), x43)) ⇒ COND1(true, x45, cons(x44, x43))≥ST(s(x45), cons(x44, x43)))



    We simplified constraint (6) using rules (III), (IV) which results in the following new constraint:

    (8)    (equal(x45, x44)=trueCOND1(true, x45, cons(x44, x43))≥ST(s(x45), cons(x44, x43)))



    We simplified constraint (7) using rule (VI) where we applied the induction hypothesis (member(x45, x43)=trueCOND1(true, x45, x43)≥ST(s(x45), x43)) with σ = [ ] which results in the following new constraint:

    (9)    (equal(x45, x44)=x48COND1(true, x45, x43)≥ST(s(x45), x43) ⇒ COND1(true, x45, cons(x44, x43))≥ST(s(x45), cons(x44, x43)))



    We simplified constraint (9) using rule (IV) which results in the following new constraint:

    (10)    (COND1(true, x45, x43)≥ST(s(x45), x43) ⇒ COND1(true, x45, cons(x44, x43))≥ST(s(x45), cons(x44, x43)))



    We simplified constraint (8) using rule (V) (with possible (I) afterwards) using induction on equal(x45, x44)=true which results in the following new constraints:

    (11)    (true=trueCOND1(true, 0, cons(0, x43))≥ST(s(0), cons(0, x43)))


    (12)    (equal(x53, x52)=true∧(∀x54:equal(x53, x52)=trueCOND1(true, x53, cons(x52, x54))≥ST(s(x53), cons(x52, x54))) ⇒ COND1(true, s(x53), cons(s(x52), x43))≥ST(s(s(x53)), cons(s(x52), x43)))



    We simplified constraint (11) using rules (I), (II) which results in the following new constraint:

    (13)    (COND1(true, 0, cons(0, x43))≥ST(s(0), cons(0, x43)))



    We simplified constraint (12) using rule (VI) where we applied the induction hypothesis (∀x54:equal(x53, x52)=trueCOND1(true, x53, cons(x52, x54))≥ST(s(x53), cons(x52, x54))) with σ = [x54 / x43] which results in the following new constraint:

    (14)    (COND1(true, x53, cons(x52, x43))≥ST(s(x53), cons(x52, x43)) ⇒ COND1(true, s(x53), cons(s(x52), x43))≥ST(s(s(x53)), cons(s(x52), x43)))







For Pair ST(n, l) → COND1(member(n, l), n, l) the following chains were created:
  • We consider the chain COND1(true, n, l) → ST(s(n), l), ST(n, l) → COND1(member(n, l), n, l) which results in the following constraint:

    (15)    (ST(s(x10), x11)=ST(x12, x13) ⇒ ST(x12, x13)≥COND1(member(x12, x13), x12, x13))



    We simplified constraint (15) using rules (I), (II), (III) which results in the following new constraint:

    (16)    (ST(s(x10), x11)≥COND1(member(s(x10), x11), s(x10), x11))



  • We consider the chain COND2(false, n, l) → ST(s(n), l), ST(n, l) → COND1(member(n, l), n, l) which results in the following constraint:

    (17)    (ST(s(x18), x19)=ST(x20, x21) ⇒ ST(x20, x21)≥COND1(member(x20, x21), x20, x21))



    We simplified constraint (17) using rules (I), (II), (III) which results in the following new constraint:

    (18)    (ST(s(x18), x19)≥COND1(member(s(x18), x19), s(x18), x19))







For Pair COND1(false, n, l) → COND2(gt(n, max(l)), n, l) the following chains were created:
  • We consider the chain ST(n, l) → COND1(member(n, l), n, l), COND1(false, n, l) → COND2(gt(n, max(l)), n, l) which results in the following constraint:

    (19)    (COND1(member(x24, x25), x24, x25)=COND1(false, x26, x27) ⇒ COND1(false, x26, x27)≥COND2(gt(x26, max(x27)), x26, x27))



    We simplified constraint (19) using rules (I), (II), (III) which results in the following new constraint:

    (20)    (member(x24, x25)=falseCOND1(false, x24, x25)≥COND2(gt(x24, max(x25)), x24, x25))



    We simplified constraint (20) using rule (V) (with possible (I) afterwards) using induction on member(x24, x25)=false which results in the following new constraints:

    (21)    (false=falseCOND1(false, x55, nil)≥COND2(gt(x55, max(nil)), x55, nil))


    (22)    (or(equal(x58, x57), member(x58, x56))=false∧(member(x58, x56)=falseCOND1(false, x58, x56)≥COND2(gt(x58, max(x56)), x58, x56)) ⇒ COND1(false, x58, cons(x57, x56))≥COND2(gt(x58, max(cons(x57, x56))), x58, cons(x57, x56)))



    We simplified constraint (21) using rules (I), (II) which results in the following new constraint:

    (23)    (COND1(false, x55, nil)≥COND2(gt(x55, max(nil)), x55, nil))



    We simplified constraint (22) using rule (VII) which results in the following new constraint:

    (24)    (equal(x58, x57)=x59member(x58, x56)=x60or(x59, x60)=false∧(member(x58, x56)=falseCOND1(false, x58, x56)≥COND2(gt(x58, max(x56)), x58, x56)) ⇒ COND1(false, x58, cons(x57, x56))≥COND2(gt(x58, max(cons(x57, x56))), x58, cons(x57, x56)))



    We simplified constraint (24) using rule (V) (with possible (I) afterwards) using induction on or(x59, x60)=false which results in the following new constraint:

    (25)    (x62=falseequal(x58, x57)=x62member(x58, x56)=false∧(member(x58, x56)=falseCOND1(false, x58, x56)≥COND2(gt(x58, max(x56)), x58, x56)) ⇒ COND1(false, x58, cons(x57, x56))≥COND2(gt(x58, max(cons(x57, x56))), x58, cons(x57, x56)))



    We simplified constraint (25) using rule (VI) where we applied the induction hypothesis (member(x58, x56)=falseCOND1(false, x58, x56)≥COND2(gt(x58, max(x56)), x58, x56)) with σ = [ ] which results in the following new constraint:

    (26)    (x62=falseequal(x58, x57)=x62COND1(false, x58, x56)≥COND2(gt(x58, max(x56)), x58, x56) ⇒ COND1(false, x58, cons(x57, x56))≥COND2(gt(x58, max(cons(x57, x56))), x58, cons(x57, x56)))



    We simplified constraint (26) using rule (III) which results in the following new constraint:

    (27)    (equal(x58, x57)=falseCOND1(false, x58, x56)≥COND2(gt(x58, max(x56)), x58, x56) ⇒ COND1(false, x58, cons(x57, x56))≥COND2(gt(x58, max(cons(x57, x56))), x58, cons(x57, x56)))



    We simplified constraint (27) using rule (V) (with possible (I) afterwards) using induction on equal(x58, x57)=false which results in the following new constraints:

    (28)    (false=falseCOND1(false, s(x63), x56)≥COND2(gt(s(x63), max(x56)), s(x63), x56) ⇒ COND1(false, s(x63), cons(0, x56))≥COND2(gt(s(x63), max(cons(0, x56))), s(x63), cons(0, x56)))


    (29)    (false=falseCOND1(false, 0, x56)≥COND2(gt(0, max(x56)), 0, x56) ⇒ COND1(false, 0, cons(s(x64), x56))≥COND2(gt(0, max(cons(s(x64), x56))), 0, cons(s(x64), x56)))


    (30)    (equal(x66, x65)=falseCOND1(false, s(x66), x56)≥COND2(gt(s(x66), max(x56)), s(x66), x56)∧(∀x67:equal(x66, x65)=falseCOND1(false, x66, x67)≥COND2(gt(x66, max(x67)), x66, x67) ⇒ COND1(false, x66, cons(x65, x67))≥COND2(gt(x66, max(cons(x65, x67))), x66, cons(x65, x67))) ⇒ COND1(false, s(x66), cons(s(x65), x56))≥COND2(gt(s(x66), max(cons(s(x65), x56))), s(x66), cons(s(x65), x56)))



    We simplified constraint (28) using rules (I), (II) which results in the following new constraint:

    (31)    (COND1(false, s(x63), x56)≥COND2(gt(s(x63), max(x56)), s(x63), x56) ⇒ COND1(false, s(x63), cons(0, x56))≥COND2(gt(s(x63), max(cons(0, x56))), s(x63), cons(0, x56)))



    We simplified constraint (29) using rules (I), (II) which results in the following new constraint:

    (32)    (COND1(false, 0, x56)≥COND2(gt(0, max(x56)), 0, x56) ⇒ COND1(false, 0, cons(s(x64), x56))≥COND2(gt(0, max(cons(s(x64), x56))), 0, cons(s(x64), x56)))



    We simplified constraint (30) using rule (IV) which results in the following new constraint:

    (33)    (COND1(false, s(x66), x56)≥COND2(gt(s(x66), max(x56)), s(x66), x56) ⇒ COND1(false, s(x66), cons(s(x65), x56))≥COND2(gt(s(x66), max(cons(s(x65), x56))), s(x66), cons(s(x65), x56)))







For Pair COND2(false, n, l) → ST(s(n), l) the following chains were created:
  • We consider the chain COND1(false, n, l) → COND2(gt(n, max(l)), n, l), COND2(false, n, l) → ST(s(n), l) which results in the following constraint:

    (34)    (COND2(gt(x36, max(x37)), x36, x37)=COND2(false, x38, x39) ⇒ COND2(false, x38, x39)≥ST(s(x38), x39))



    We simplified constraint (34) using rules (I), (II), (III), (VII) which results in the following new constraint:

    (35)    (max(x37)=x68gt(x36, x68)=falseCOND2(false, x36, x37)≥ST(s(x36), x37))



    We simplified constraint (35) using rule (V) (with possible (I) afterwards) using induction on gt(x36, x68)=false which results in the following new constraints:

    (36)    (false=falsemax(x37)=x69COND2(false, 0, x37)≥ST(s(0), x37))


    (37)    (gt(x72, x71)=falsemax(x37)=s(x71)∧(∀x73:gt(x72, x71)=falsemax(x73)=x71COND2(false, x72, x73)≥ST(s(x72), x73)) ⇒ COND2(false, s(x72), x37)≥ST(s(s(x72)), x37))



    We simplified constraint (36) using rules (I), (II), (IV) which results in the following new constraint:

    (38)    (COND2(false, 0, x37)≥ST(s(0), x37))



    We simplified constraint (37) using rule (V) (with possible (I) afterwards) using induction on max(x37)=s(x71) which results in the following new constraint:

    (39)    (if(gt(x75, max(x74)), x75, max(x74))=s(x71)∧gt(x72, x71)=false∧(∀x73:gt(x72, x71)=falsemax(x73)=x71COND2(false, x72, x73)≥ST(s(x72), x73))∧(∀x76,x77,x78:max(x74)=s(x76)∧gt(x77, x76)=false∧(∀x78:gt(x77, x76)=falsemax(x78)=x76COND2(false, x77, x78)≥ST(s(x77), x78)) ⇒ COND2(false, s(x77), x74)≥ST(s(s(x77)), x74)) ⇒ COND2(false, s(x72), cons(x75, x74))≥ST(s(s(x72)), cons(x75, x74)))



    We simplified constraint (39) using rules (IV), (VII) which results in the following new constraint:

    (40)    (gt(x75, x81)=x79max(x74)=x80if(x79, x75, x80)=s(x71)∧gt(x72, x71)=false∧(∀x73:gt(x72, x71)=falsemax(x73)=x71COND2(false, x72, x73)≥ST(s(x72), x73))∧(∀x76,x77,x78:max(x74)=s(x76)∧gt(x77, x76)=false∧(∀x78:gt(x77, x76)=falsemax(x78)=x76COND2(false, x77, x78)≥ST(s(x77), x78)) ⇒ COND2(false, s(x77), x74)≥ST(s(s(x77)), x74)) ⇒ COND2(false, s(x72), cons(x75, x74))≥ST(s(s(x72)), cons(x75, x74)))



    We simplified constraint (40) using rule (V) (with possible (I) afterwards) using induction on if(x79, x75, x80)=s(x71) which results in the following new constraints:

    (41)    (x83=s(x71)∧gt(x83, x81)=truemax(x74)=x82gt(x72, x71)=false∧(∀x73:gt(x72, x71)=falsemax(x73)=x71COND2(false, x72, x73)≥ST(s(x72), x73))∧(∀x76,x77,x78:max(x74)=s(x76)∧gt(x77, x76)=false∧(∀x78:gt(x77, x76)=falsemax(x78)=x76COND2(false, x77, x78)≥ST(s(x77), x78)) ⇒ COND2(false, s(x77), x74)≥ST(s(s(x77)), x74)) ⇒ COND2(false, s(x72), cons(x83, x74))≥ST(s(s(x72)), cons(x83, x74)))


    (42)    (x84=s(x71)∧gt(x85, x81)=falsemax(x74)=x84gt(x72, x71)=false∧(∀x73:gt(x72, x71)=falsemax(x73)=x71COND2(false, x72, x73)≥ST(s(x72), x73))∧(∀x76,x77,x78:max(x74)=s(x76)∧gt(x77, x76)=false∧(∀x78:gt(x77, x76)=falsemax(x78)=x76COND2(false, x77, x78)≥ST(s(x77), x78)) ⇒ COND2(false, s(x77), x74)≥ST(s(s(x77)), x74)) ⇒ COND2(false, s(x72), cons(x85, x74))≥ST(s(s(x72)), cons(x85, x74)))



    We simplified constraint (41) using rules (III), (IV), (VII) which results in the following new constraint:

    (43)    (gt(x72, x71)=false∧(∀x76,x77:max(x74)=s(x76)∧gt(x77, x76)=falseCOND2(false, s(x77), x74)≥ST(s(s(x77)), x74)) ⇒ COND2(false, s(x72), cons(s(x71), x74))≥ST(s(s(x72)), cons(s(x71), x74)))



    We simplified constraint (42) using rule (III) which results in the following new constraint:

    (44)    (gt(x85, x81)=falsemax(x74)=s(x71)∧gt(x72, x71)=false∧(∀x73:gt(x72, x71)=falsemax(x73)=x71COND2(false, x72, x73)≥ST(s(x72), x73))∧(∀x76,x77,x78:max(x74)=s(x76)∧gt(x77, x76)=false∧(∀x78:gt(x77, x76)=falsemax(x78)=x76COND2(false, x77, x78)≥ST(s(x77), x78)) ⇒ COND2(false, s(x77), x74)≥ST(s(s(x77)), x74)) ⇒ COND2(false, s(x72), cons(x85, x74))≥ST(s(s(x72)), cons(x85, x74)))



    We simplified constraint (43) using rule (V) (with possible (I) afterwards) using induction on gt(x72, x71)=false which results in the following new constraints:

    (45)    (false=false∧(∀x76,x77:max(x74)=s(x76)∧gt(x77, x76)=falseCOND2(false, s(x77), x74)≥ST(s(s(x77)), x74)) ⇒ COND2(false, s(0), cons(s(x87), x74))≥ST(s(s(0)), cons(s(x87), x74)))


    (46)    (gt(x90, x89)=false∧(∀x76,x77:max(x74)=s(x76)∧gt(x77, x76)=falseCOND2(false, s(x77), x74)≥ST(s(s(x77)), x74))∧(∀x91,x92,x93:gt(x90, x89)=false∧(∀x92,x93:max(x91)=s(x92)∧gt(x93, x92)=falseCOND2(false, s(x93), x91)≥ST(s(s(x93)), x91)) ⇒ COND2(false, s(x90), cons(s(x89), x91))≥ST(s(s(x90)), cons(s(x89), x91))) ⇒ COND2(false, s(s(x90)), cons(s(s(x89)), x74))≥ST(s(s(s(x90))), cons(s(s(x89)), x74)))



    We simplified constraint (45) using rules (I), (II), (IV) which results in the following new constraint:

    (47)    (COND2(false, s(0), cons(s(x87), x74))≥ST(s(s(0)), cons(s(x87), x74)))



    We simplified constraint (46) using rule (VI) where we applied the induction hypothesis (∀x91,x92,x93:gt(x90, x89)=false∧(∀x92,x93:max(x91)=s(x92)∧gt(x93, x92)=falseCOND2(false, s(x93), x91)≥ST(s(s(x93)), x91)) ⇒ COND2(false, s(x90), cons(s(x89), x91))≥ST(s(s(x90)), cons(s(x89), x91))) with σ = [x93 / x77, x91 / x74, x92 / x76] which results in the following new constraint:

    (48)    (COND2(false, s(x90), cons(s(x89), x74))≥ST(s(s(x90)), cons(s(x89), x74)) ⇒ COND2(false, s(s(x90)), cons(s(s(x89)), x74))≥ST(s(s(s(x90))), cons(s(s(x89)), x74)))



    We simplified constraint (44) using rule (VI) where we applied the induction hypothesis (∀x76,x77,x78:max(x74)=s(x76)∧gt(x77, x76)=false∧(∀x78:gt(x77, x76)=falsemax(x78)=x76COND2(false, x77, x78)≥ST(s(x77), x78)) ⇒ COND2(false, s(x77), x74)≥ST(s(s(x77)), x74)) with σ = [x76 / x71, x77 / x72, x78 / x73] which results in the following new constraint:

    (49)    (gt(x85, x81)=falseCOND2(false, s(x72), x74)≥ST(s(s(x72)), x74) ⇒ COND2(false, s(x72), cons(x85, x74))≥ST(s(s(x72)), cons(x85, x74)))



    We simplified constraint (49) using rule (V) (with possible (I) afterwards) using induction on gt(x85, x81)=false which results in the following new constraints:

    (50)    (false=falseCOND2(false, s(x72), x74)≥ST(s(s(x72)), x74) ⇒ COND2(false, s(x72), cons(0, x74))≥ST(s(s(x72)), cons(0, x74)))


    (51)    (gt(x97, x96)=falseCOND2(false, s(x72), x74)≥ST(s(s(x72)), x74)∧(∀x98,x99:gt(x97, x96)=falseCOND2(false, s(x98), x99)≥ST(s(s(x98)), x99) ⇒ COND2(false, s(x98), cons(x97, x99))≥ST(s(s(x98)), cons(x97, x99))) ⇒ COND2(false, s(x72), cons(s(x97), x74))≥ST(s(s(x72)), cons(s(x97), x74)))



    We simplified constraint (50) using rules (I), (II) which results in the following new constraint:

    (52)    (COND2(false, s(x72), x74)≥ST(s(s(x72)), x74) ⇒ COND2(false, s(x72), cons(0, x74))≥ST(s(s(x72)), cons(0, x74)))



    We simplified constraint (51) using rule (VI) where we applied the induction hypothesis (∀x98,x99:gt(x97, x96)=falseCOND2(false, s(x98), x99)≥ST(s(s(x98)), x99) ⇒ COND2(false, s(x98), cons(x97, x99))≥ST(s(s(x98)), cons(x97, x99))) with σ = [x98 / x72, x99 / x74] which results in the following new constraint:

    (53)    (COND2(false, s(x72), cons(x97, x74))≥ST(s(s(x72)), cons(x97, x74)) ⇒ COND2(false, s(x72), cons(s(x97), x74))≥ST(s(s(x72)), cons(s(x97), x74)))







To summarize, we get the following constraints P for the following pairs.
  • COND1(true, n, l) → ST(s(n), l)
    • (COND1(true, x45, x43)≥ST(s(x45), x43) ⇒ COND1(true, x45, cons(x44, x43))≥ST(s(x45), cons(x44, x43)))
    • (COND1(true, 0, cons(0, x43))≥ST(s(0), cons(0, x43)))
    • (COND1(true, x53, cons(x52, x43))≥ST(s(x53), cons(x52, x43)) ⇒ COND1(true, s(x53), cons(s(x52), x43))≥ST(s(s(x53)), cons(s(x52), x43)))

  • ST(n, l) → COND1(member(n, l), n, l)
    • (ST(s(x10), x11)≥COND1(member(s(x10), x11), s(x10), x11))
    • (ST(s(x18), x19)≥COND1(member(s(x18), x19), s(x18), x19))

  • COND1(false, n, l) → COND2(gt(n, max(l)), n, l)
    • (COND1(false, x55, nil)≥COND2(gt(x55, max(nil)), x55, nil))
    • (COND1(false, s(x63), x56)≥COND2(gt(s(x63), max(x56)), s(x63), x56) ⇒ COND1(false, s(x63), cons(0, x56))≥COND2(gt(s(x63), max(cons(0, x56))), s(x63), cons(0, x56)))
    • (COND1(false, 0, x56)≥COND2(gt(0, max(x56)), 0, x56) ⇒ COND1(false, 0, cons(s(x64), x56))≥COND2(gt(0, max(cons(s(x64), x56))), 0, cons(s(x64), x56)))
    • (COND1(false, s(x66), x56)≥COND2(gt(s(x66), max(x56)), s(x66), x56) ⇒ COND1(false, s(x66), cons(s(x65), x56))≥COND2(gt(s(x66), max(cons(s(x65), x56))), s(x66), cons(s(x65), x56)))

  • COND2(false, n, l) → ST(s(n), l)
    • (COND2(false, 0, x37)≥ST(s(0), x37))
    • (COND2(false, s(x90), cons(s(x89), x74))≥ST(s(s(x90)), cons(s(x89), x74)) ⇒ COND2(false, s(s(x90)), cons(s(s(x89)), x74))≥ST(s(s(s(x90))), cons(s(s(x89)), x74)))
    • (COND2(false, s(x72), x74)≥ST(s(s(x72)), x74) ⇒ COND2(false, s(x72), cons(0, x74))≥ST(s(s(x72)), cons(0, x74)))
    • (COND2(false, s(x72), cons(x97, x74))≥ST(s(s(x72)), cons(x97, x74)) ⇒ COND2(false, s(x72), cons(s(x97), x74))≥ST(s(s(x72)), cons(s(x97), x74)))
    • (COND2(false, s(0), cons(s(x87), x74))≥ST(s(s(0)), cons(s(x87), x74)))




The constraints for P> respective Pbound are constructed from P where we just replace every occurence of "t ≥ s" in P by "t > s" respective "t ≥ c". Here c stands for the fresh constant used for Pbound.
Using the following integer polynomial ordering the resulting constraints can be solved
Polynomial interpretation [NONINF]:

POL(0) = 1   
POL(COND1(x1, x2, x3)) = -1 - x2 + x3   
POL(COND2(x1, x2, x3)) = -1 - x1 - x2 + x3   
POL(ST(x1, x2)) = -1 - x1 + x2   
POL(c) = -2   
POL(cons(x1, x2)) = 1 + x1 + x2   
POL(equal(x1, x2)) = x2   
POL(false) = 0   
POL(gt(x1, x2)) = 0   
POL(if(x1, x2, x3)) = x2 + x3   
POL(max(x1)) = 0   
POL(member(x1, x2)) = 0   
POL(nil) = 0   
POL(or(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   
POL(true) = 0   

The following pairs are in P>:

COND1(true, n, l) → ST(s(n), l)
COND2(false, n, l) → ST(s(n), l)
The following pairs are in Pbound:

COND1(true, n, l) → ST(s(n), l)
COND2(false, n, l) → ST(s(n), l)
The following rules are usable:

falsegt(0, v)
truegt(s(u), 0)
gt(u, v) → gt(s(u), s(v))

(43) Obligation:

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

ST(n, l) → COND1(member(n, l), n, l)
COND1(false, n, l) → COND2(gt(n, max(l)), n, l)

The TRS R consists of the following rules:

max(nil) → 0
max(cons(u, l)) → if(gt(u, max(l)), u, max(l))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
if(true, u, v) → u
if(false, u, v) → v
member(n, nil) → false
member(n, cons(m, l)) → or(equal(n, m), member(n, l))
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
or(x, true) → true
or(x, false) → x

The set Q consists of the following terms:

member(x0, nil)
member(x0, cons(x1, x2))
or(x0, true)
or(x0, false)
equal(0, 0)
equal(s(x0), 0)
equal(0, s(x0))
equal(s(x0), s(x1))
gt(0, x0)
gt(s(x0), 0)
gt(s(x0), s(x1))
max(nil)
max(cons(x0, x1))
if(true, x0, x1)
if(false, x0, x1)

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

(44) DependencyGraphProof (EQUIVALENT transformation)

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

(45) TRUE