(0) Obligation:

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

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
sort(xs) → if3(empty(xs), xs)
if3(true, xs) → nil
if3(false, xs) → sort(del(max(xs), xs))
empty(nil) → true
empty(cons(x, xs)) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, 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:

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
sort(xs) → if3(empty(xs), xs)
if3(true, xs) → nil
if3(false, xs) → sort(del(max(xs), xs))
empty(nil) → true
empty(cons(x, xs)) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(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:

MAX(cons(x, cons(y, xs))) → IF1(ge(x, y), x, y, xs)
MAX(cons(x, cons(y, xs))) → GE(x, y)
IF1(true, x, y, xs) → MAX(cons(x, xs))
IF1(false, x, y, xs) → MAX(cons(y, xs))
DEL(x, cons(y, xs)) → IF2(eq(x, y), x, y, xs)
DEL(x, cons(y, xs)) → EQ(x, y)
IF2(false, x, y, xs) → DEL(x, xs)
EQ(s(x), s(y)) → EQ(x, y)
SORT(xs) → IF3(empty(xs), xs)
SORT(xs) → EMPTY(xs)
IF3(false, xs) → SORT(del(max(xs), xs))
IF3(false, xs) → DEL(max(xs), xs)
IF3(false, xs) → MAX(xs)
GE(s(x), s(y)) → GE(x, y)

The TRS R consists of the following rules:

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
sort(xs) → if3(empty(xs), xs)
if3(true, xs) → nil
if3(false, xs) → sort(del(max(xs), xs))
empty(nil) → true
empty(cons(x, xs)) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(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 5 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

GE(s(x), s(y)) → GE(x, y)

The TRS R consists of the following rules:

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
sort(xs) → if3(empty(xs), xs)
if3(true, xs) → nil
if3(false, xs) → sort(del(max(xs), xs))
empty(nil) → true
empty(cons(x, xs)) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(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:

GE(s(x), s(y)) → GE(x, y)

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

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(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].

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

(11) Obligation:

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

GE(s(x), s(y)) → GE(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:

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

(13) YES

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

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
sort(xs) → if3(empty(xs), xs)
if3(true, xs) → nil
if3(false, xs) → sort(del(max(xs), xs))
empty(nil) → true
empty(cons(x, xs)) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(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:

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

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

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(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].

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

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

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

(20) YES

(21) Obligation:

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

IF2(false, x, y, xs) → DEL(x, xs)
DEL(x, cons(y, xs)) → IF2(eq(x, y), x, y, xs)

The TRS R consists of the following rules:

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
sort(xs) → if3(empty(xs), xs)
if3(true, xs) → nil
if3(false, xs) → sort(del(max(xs), xs))
empty(nil) → true
empty(cons(x, xs)) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(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:

IF2(false, x, y, xs) → DEL(x, xs)
DEL(x, cons(y, xs)) → IF2(eq(x, y), x, y, xs)

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(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].

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

(25) Obligation:

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

IF2(false, x, y, xs) → DEL(x, xs)
DEL(x, cons(y, xs)) → IF2(eq(x, y), x, y, xs)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(y)) → 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.

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

  • DEL(x, cons(y, xs)) → IF2(eq(x, y), x, y, xs)
    The graph contains the following edges 1 >= 2, 2 > 3, 2 > 4

  • IF2(false, x, y, xs) → DEL(x, xs)
    The graph contains the following edges 2 >= 1, 4 >= 2

(27) YES

(28) Obligation:

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

IF1(true, x, y, xs) → MAX(cons(x, xs))
MAX(cons(x, cons(y, xs))) → IF1(ge(x, y), x, y, xs)
IF1(false, x, y, xs) → MAX(cons(y, xs))

The TRS R consists of the following rules:

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
sort(xs) → if3(empty(xs), xs)
if3(true, xs) → nil
if3(false, xs) → sort(del(max(xs), xs))
empty(nil) → true
empty(cons(x, xs)) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(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:

IF1(true, x, y, xs) → MAX(cons(x, xs))
MAX(cons(x, cons(y, xs))) → IF1(ge(x, y), x, y, xs)
IF1(false, x, y, xs) → MAX(cons(y, xs))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(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].

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))

(32) Obligation:

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

IF1(true, x, y, xs) → MAX(cons(x, xs))
MAX(cons(x, cons(y, xs))) → IF1(ge(x, y), x, y, xs)
IF1(false, x, y, xs) → MAX(cons(y, xs))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(33) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MAX(cons(x, cons(y, xs))) → IF1(ge(x, y), x, y, xs)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(IF1(x1, x2, x3, x4)) = 1 + x4   
POL(MAX(x1)) = x1   
POL(cons(x1, x2)) = 1 + x2   
POL(false) = 0   
POL(ge(x1, x2)) = 0   
POL(s(x1)) = 0   
POL(true) = 0   

The following usable rules [FROCOS05] were oriented: none

(34) Obligation:

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

IF1(true, x, y, xs) → MAX(cons(x, xs))
IF1(false, x, y, xs) → MAX(cons(y, xs))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(35) DependencyGraphProof (EQUIVALENT transformation)

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

(36) TRUE

(37) Obligation:

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

IF3(false, xs) → SORT(del(max(xs), xs))
SORT(xs) → IF3(empty(xs), xs)

The TRS R consists of the following rules:

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
sort(xs) → if3(empty(xs), xs)
if3(true, xs) → nil
if3(false, xs) → sort(del(max(xs), xs))
empty(nil) → true
empty(cons(x, xs)) → false
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

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

(39) Obligation:

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

IF3(false, xs) → SORT(del(max(xs), xs))
SORT(xs) → IF3(empty(xs), xs)

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(x, xs)) → false
max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
sort(x0)
if3(true, x0)
if3(false, x0)
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(40) 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)
if3(true, x0)
if3(false, x0)

(41) Obligation:

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

IF3(false, xs) → SORT(del(max(xs), xs))
SORT(xs) → IF3(empty(xs), xs)

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(x, xs)) → false
max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(42) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule SORT(xs) → IF3(empty(xs), xs) at position [0] we obtained the following new rules [LPAR04]:

SORT(nil) → IF3(true, nil)
SORT(cons(x0, x1)) → IF3(false, cons(x0, x1))

(43) Obligation:

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

IF3(false, xs) → SORT(del(max(xs), xs))
SORT(nil) → IF3(true, nil)
SORT(cons(x0, x1)) → IF3(false, cons(x0, x1))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(x, xs)) → false
max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(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 1 SCC with 1 less node.

(45) Obligation:

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

SORT(cons(x0, x1)) → IF3(false, cons(x0, x1))
IF3(false, xs) → SORT(del(max(xs), xs))

The TRS R consists of the following rules:

empty(nil) → true
empty(cons(x, xs)) → false
max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(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:

SORT(cons(x0, x1)) → IF3(false, cons(x0, x1))
IF3(false, xs) → SORT(del(max(xs), xs))

The TRS R consists of the following rules:

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
empty(nil)
empty(cons(x0, x1))
ge(x0, 0)
ge(0, s(x0))
ge(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].

empty(nil)
empty(cons(x0, x1))

(49) Obligation:

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

SORT(cons(x0, x1)) → IF3(false, cons(x0, x1))
IF3(false, xs) → SORT(del(max(xs), xs))

The TRS R consists of the following rules:

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(50) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule IF3(false, xs) → SORT(del(max(xs), xs)) we obtained the following new rules [LPAR04]:

IF3(false, cons(z0, z1)) → SORT(del(max(cons(z0, z1)), cons(z0, z1)))

(51) Obligation:

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

SORT(cons(x0, x1)) → IF3(false, cons(x0, x1))
IF3(false, cons(z0, z1)) → SORT(del(max(cons(z0, z1)), cons(z0, z1)))

The TRS R consists of the following rules:

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(52) Induction-Processor (SOUND transformation)


This DP could be deleted by the Induction-Processor:
IF3(false, cons(z0, z1)) → SORT(del(max(cons(z0, z1)), cons(z0, z1)))


This order was computed:
Polynomial interpretation [POLO]:

POL(0) = 1   
POL(IF3(x1, x2)) = x2   
POL(SORT(x1)) = x1   
POL(cons(x1, x2)) = 1 + x1 + x2   
POL(del(x1, x2)) = x2   
POL(eq(x1, x2)) = x2   
POL(false) = 1   
POL(ge(x1, x2)) = 1   
POL(if1(x1, x2, x3, x4)) = 1 + x1 + x2 + x3 + x4   
POL(if2(x1, x2, x3, x4)) = 1 + x3 + x4   
POL(max(x1)) = 1 + x1   
POL(nil) = 1   
POL(s(x1)) = 1 + x1   
POL(true) = 1   

At least one of these decreasing rules is always used after the deleted DP:
if2(true, x1499, y1039, xs689) → xs689


The following formula is valid:
z2:sort[a34].(¬(z2 =nil)→del'(max(z2 ), z2 )=true)


The transformed set:
del'(x67, nil) → false
del'(x81, cons(y55, xs37)) → if2'(eq(x81, y55), x81, y55, xs37)
if2'(true, x149, y103, xs68) → true
if2'(false, x163, y113, xs75) → del'(x163, xs75)
max(nil) → 0
max(cons(x11, nil)) → x11
max(cons(x25, cons(y16, xs10))) → if1(ge(x25, y16), x25, y16, xs10)
if1(true, x39, y26, xs17) → max(cons(x39, xs17))
if1(false, x53, y36, xs24) → max(cons(y36, xs24))
del(x67, nil) → nil
del(x81, cons(y55, xs37)) → if2(eq(x81, y55), x81, y55, xs37)
eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)
if2(true, x149, y103, xs68) → xs68
if2(false, x163, y113, xs75) → cons(y113, del(x163, xs75))
ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a33](0, 0) → true
equal_sort[a33](0, s(x0)) → false
equal_sort[a33](s(x0), 0) → false
equal_sort[a33](s(x0), s(x1)) → equal_sort[a33](x0, x1)
equal_sort[a34](nil, nil) → true
equal_sort[a34](nil, cons(x0, x1)) → false
equal_sort[a34](cons(x0, x1), nil) → false
equal_sort[a34](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63]) → true


The proof given by the theorem prover:
The following input was given to ACL2:
(set-ruler-extenders :all)

(defun trs_isbool (x)
  (or
    (and
      (consp
        x
      )
      (eq
        'trs_true
        (car
          x
        )
      )
      (eq
        (cdr
          x
        )
        'nil
      )
    )
    (and
      (consp
        x
      )
      (eq
        'trs_false
        (car
          x
        )
      )
      (eq
        (cdr
          x
        )
        'nil
      )
    )
  )
)
(defun trs_issort[a33] (x)
  (or
    (and
      (consp
        x
      )
      (eq
        'trs_0
        (car
          x
        )
      )
      (eq
        (cdr
          x
        )
        'nil
      )
    )
    (and
      (consp
        x
      )
      (consp
        (cdr
          x
        )
      )
      (eq
        'trs_s
        (car
          x
        )
      )
      (trs_issort[a33]
        (car
          (cdr
            x
          )
        )
      )
      (eq
        (cdr
          (cdr
            x
          )
        )
        'nil
      )
    )
  )
)
(defun trs_issort[a63] (x)
  (or
    (and
      (consp
        x
      )
      (eq
        'trs_witness_sort[a63]
        (car
          x
        )
      )
      (eq
        (cdr
          x
        )
        'nil
      )
    )
  )
)
(defun trs_issort[a34] (x)
  (or
    (and
      (consp
        x
      )
      (eq
        'trs_nil
        (car
          x
        )
      )
      (eq
        (cdr
          x
        )
        'nil
      )
    )
    (and
      (consp
        x
      )
      (consp
        (cdr
          x
        )
      )
      (consp
        (cdr
          (cdr
            x
          )
        )
      )
      (eq
        'trs_cons
        (car
          x
        )
      )
      (trs_issort[a33]
        (car
          (cdr
            x
          )
        )
      )
      (trs_issort[a34]
        (car
          (cdr
            (cdr
              x
            )
          )
        )
      )
      (eq
        (cdr
          (cdr
            (cdr
              x
            )
          )
        )
        'nil
      )
    )
  )
)
(defun trs_ge (x0 x1)
  (if
    (and
      (trs_issort[a33]
        x0
      )
      (trs_issort[a33]
        x1
      )
    )
    (if
      (and
        (eq
          (car
            x1
          )
          'trs_0
        )
      )
      (list 'trs_true
      )
      (if
        (and
          (eq
            (car
              x0
            )
            'trs_0
          )
          (eq
            (car
              x1
            )
            'trs_s
          )
        )
        (list 'trs_false
        )
        (if
          (and
          )
          (trs_ge
            (car
              (cdr
                x0
              )
            )
            (car
              (cdr
                x1
              )
            )
          )
          (list 'trs_true
          )
        )
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_eq (x0 x1)
  (if
    (and
      (trs_issort[a33]
        x0
      )
      (trs_issort[a33]
        x1
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_0
        )
        (eq
          (car
            x1
          )
          'trs_0
        )
      )
      (list 'trs_true
      )
      (if
        (and
          (eq
            (car
              x0
            )
            'trs_0
          )
          (eq
            (car
              x1
            )
            'trs_s
          )
        )
        (list 'trs_false
        )
        (if
          (and
            (eq
              (car
                x0
              )
              'trs_s
            )
            (eq
              (car
                x1
              )
              'trs_0
            )
          )
          (list 'trs_false
          )
          (if
            (and
            )
            (trs_eq
              (car
                (cdr
                  x0
                )
              )
              (car
                (cdr
                  x1
                )
              )
            )
            (list 'trs_true
            )
          )
        )
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_equal_sort[a63] (x0 x1)
  (if
    (and
      (trs_issort[a63]
        x0
      )
      (trs_issort[a63]
        x1
      )
    )
    (if
      (and
      )
      (list 'trs_true
      )
      (list 'trs_true
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_equal_sort[a33] (x0 x1)
  (if
    (and
      (trs_issort[a33]
        x0
      )
      (trs_issort[a33]
        x1
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_0
        )
        (eq
          (car
            x1
          )
          'trs_0
        )
      )
      (list 'trs_true
      )
      (if
        (and
          (eq
            (car
              x0
            )
            'trs_0
          )
          (eq
            (car
              x1
            )
            'trs_s
          )
        )
        (list 'trs_false
        )
        (if
          (and
            (eq
              (car
                x0
              )
              'trs_s
            )
            (eq
              (car
                x1
              )
              'trs_0
            )
          )
          (list 'trs_false
          )
          (if
            (and
            )
            (trs_equal_sort[a33]
              (car
                (cdr
                  x0
                )
              )
              (car
                (cdr
                  x1
                )
              )
            )
            (list 'trs_true
            )
          )
        )
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_isa_false (x0)
  (if
    (and
      (trs_isbool
        x0
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_true
        )
      )
      (list 'trs_false
      )
      (if
        (and
        )
        (list 'trs_true
        )
        (list 'trs_true
        )
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_isa_true (x0)
  (if
    (and
      (trs_isbool
        x0
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_true
        )
      )
      (list 'trs_true
      )
      (if
        (and
        )
        (list 'trs_false
        )
        (list 'trs_true
        )
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_not (x0)
  (if
    (and
      (trs_isbool
        x0
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_false
        )
      )
      (list 'trs_true
      )
      (if
        (and
        )
        (list 'trs_false
        )
        (list 'trs_true
        )
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_or (x0 x1)
  (if
    (and
      (trs_isbool
        x0
      )
      (trs_isbool
        x1
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_true
        )
      )
      (list 'trs_true
      )
      (if
        (and
        )
        x1
        (list 'trs_true
        )
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_and (x0 x1)
  (if
    (and
      (trs_isbool
        x0
      )
      (trs_isbool
        x1
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_true
        )
      )
      x1
      (if
        (and
        )
        (list 'trs_false
        )
        (list 'trs_true
        )
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_equal_bool (x0 x1)
  (if
    (and
      (trs_isbool
        x0
      )
      (trs_isbool
        x1
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_true
        )
        (eq
          (car
            x1
          )
          'trs_false
        )
      )
      (list 'trs_false
      )
      (if
        (and
          (eq
            (car
              x0
            )
            'trs_false
          )
          (eq
            (car
              x1
            )
            'trs_true
          )
        )
        (list 'trs_false
        )
        (if
          (and
            (eq
              (car
                x0
              )
              'trs_true
            )
            (eq
              (car
                x1
              )
              'trs_true
            )
          )
          (list 'trs_true
          )
          (if
            (and
            )
            (list 'trs_true
            )
            (list 'trs_true
            )
          )
        )
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_if1 (x0 x1 x2 x3)
  (if
    (and
      (trs_isbool
        x0
      )
      (trs_issort[a33]
        x1
      )
      (trs_issort[a33]
        x2
      )
      (trs_issort[a34]
        x3
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_true
        )
        (eq
          (car
            x3
          )
          'trs_nil
        )
      )
      x1
      (if
        (and
          (eq
            (car
              x0
            )
            'trs_true
          )
          (eq
            (car
              x3
            )
            'trs_cons
          )
        )
        (trs_if1
          (trs_ge
            x1
            (car
              (cdr
                x3
              )
            )
          )
          x1
          (car
            (cdr
              x3
            )
          )
          (car
            (cdr
              (cdr
                x3
              )
            )
          )
        )
        (if
          (and
            (eq
              (car
                x0
              )
              'trs_false
            )
            (eq
              (car
                x3
              )
              'trs_nil
            )
          )
          x2
          (if
            (and
              (eq
                (car
                  x0
                )
                'trs_false
              )
              (eq
                (car
                  x3
                )
                'trs_cons
              )
            )
            (trs_if1
              (trs_ge
                x2
                (car
                  (cdr
                    x3
                  )
                )
              )
              x2
              (car
                (cdr
                  x3
                )
              )
              (car
                (cdr
                  (cdr
                    x3
                  )
                )
              )
            )
            (if
              (and
                (eq
                  (car
                    x0
                  )
                  'trs_true
                )
              )
              (list 'trs_0
              )
              (if
                (and
                )
                (list 'trs_0
                )
                (list 'trs_0
                )
              )
            )
          )
        )
      )
    )
    (list 'trs_0
    )
  )
)
(defun trs_max (x0)
  (if
    (and
      (trs_issort[a34]
        x0
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_nil
        )
      )
      (list 'trs_0
      )
      (if
        (and
          (eq
            (car
              x0
            )
            'trs_cons
          )
          (eq
            (car
              (car
                (cdr
                  (cdr
                    x0
                  )
                )
              )
            )
            'trs_nil
          )
        )
        (car
          (cdr
            x0
          )
        )
        (if
          (and
            (eq
              (car
                x0
              )
              'trs_cons
            )
            (eq
              (car
                (car
                  (cdr
                    (cdr
                      x0
                    )
                  )
                )
              )
              'trs_cons
            )
            (eq
              (trs_equal_bool
                (trs_ge
                  (car
                    (cdr
                      x0
                    )
                  )
                  (car
                    (cdr
                      (car
                        (cdr
                          (cdr
                            x0
                          )
                        )
                      )
                    )
                  )
                )
                (list 'trs_true
                )
              )
              (list 'trs_true
              )
            )
          )
          (trs_max
            (list 'trs_cons
              (car
                (cdr
                  x0
                )
              )
              (car
                (cdr
                  (cdr
                    (car
                      (cdr
                        (cdr
                          x0
                        )
                      )
                    )
                  )
                )
              )
            )
          )
          (if
            (and
              (eq
                (trs_equal_bool
                  (trs_ge
                    (car
                      (cdr
                        x0
                      )
                    )
                    (car
                      (cdr
                        (car
                          (cdr
                            (cdr
                              x0
                            )
                          )
                        )
                      )
                    )
                  )
                  (list 'trs_true
                  )
                )
                (list 'trs_false
                )
              )
            )
            (trs_max
              (list 'trs_cons
                (car
                  (cdr
                    (car
                      (cdr
                        (cdr
                          x0
                        )
                      )
                    )
                  )
                )
                (car
                  (cdr
                    (cdr
                      (car
                        (cdr
                          (cdr
                            x0
                          )
                        )
                      )
                    )
                  )
                )
              )
            )
            (list 'trs_0
            )
          )
        )
      )
    )
    (list 'trs_0
    )
  )
)
(defun trs_if2 (x0 x1 x2 x3)
  (if
    (and
      (trs_isbool
        x0
      )
      (trs_issort[a33]
        x1
      )
      (trs_issort[a33]
        x2
      )
      (trs_issort[a34]
        x3
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_true
        )
      )
      x3
      (if
        (and
          (eq
            (car
              x0
            )
            'trs_false
          )
          (eq
            (car
              x3
            )
            'trs_nil
          )
        )
        (list 'trs_cons
          x2
          (list 'trs_nil
          )
        )
        (if
          (and
          )
          (list 'trs_cons
            x2
            (trs_if2
              (trs_eq
                x1
                (car
                  (cdr
                    x3
                  )
                )
              )
              x1
              (car
                (cdr
                  x3
                )
              )
              (car
                (cdr
                  (cdr
                    x3
                  )
                )
              )
            )
          )
          (list 'trs_nil
          )
        )
      )
    )
    (list 'trs_nil
    )
  )
)
(defun trs_if2prime (x0 x1 x2 x3)
  (if
    (and
      (trs_isbool
        x0
      )
      (trs_issort[a33]
        x1
      )
      (trs_issort[a33]
        x2
      )
      (trs_issort[a34]
        x3
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_true
        )
      )
      (list 'trs_true
      )
      (if
        (and
          (eq
            (car
              x0
            )
            'trs_false
          )
          (eq
            (car
              x3
            )
            'trs_nil
          )
        )
        (list 'trs_false
        )
        (if
          (and
          )
          (trs_if2prime
            (trs_eq
              x1
              (car
                (cdr
                  x3
                )
              )
            )
            x1
            (car
              (cdr
                x3
              )
            )
            (car
              (cdr
                (cdr
                  x3
                )
              )
            )
          )
          (list 'trs_true
          )
        )
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_del (x0 x1)
  (if
    (and
      (trs_issort[a33]
        x0
      )
      (trs_issort[a34]
        x1
      )
    )
    (if
      (and
        (eq
          (car
            x1
          )
          'trs_nil
        )
      )
      (list 'trs_nil
      )
      (if
        (and
          (eq
            (car
              x1
            )
            'trs_cons
          )
          (eq
            (trs_equal_bool
              (trs_eq
                x0
                (car
                  (cdr
                    x1
                  )
                )
              )
              (list 'trs_true
              )
            )
            (list 'trs_true
            )
          )
        )
        (car
          (cdr
            (cdr
              x1
            )
          )
        )
        (if
          (and
            (eq
              (trs_equal_bool
                (trs_eq
                  x0
                  (car
                    (cdr
                      x1
                    )
                  )
                )
                (list 'trs_true
                )
              )
              (list 'trs_false
              )
            )
          )
          (list 'trs_cons
            (car
              (cdr
                x1
              )
            )
            (trs_del
              x0
              (car
                (cdr
                  (cdr
                    x1
                  )
                )
              )
            )
          )
          (list 'trs_nil
          )
        )
      )
    )
    (list 'trs_nil
    )
  )
)
(defun trs_delprime (x0 x1)
  (if
    (and
      (trs_issort[a33]
        x0
      )
      (trs_issort[a34]
        x1
      )
    )
    (if
      (and
        (eq
          (car
            x1
          )
          'trs_nil
        )
      )
      (list 'trs_false
      )
      (if
        (and
          (eq
            (car
              x1
            )
            'trs_cons
          )
          (eq
            (trs_equal_bool
              (trs_eq
                x0
                (car
                  (cdr
                    x1
                  )
                )
              )
              (list 'trs_true
              )
            )
            (list 'trs_true
            )
          )
        )
        (list 'trs_true
        )
        (if
          (and
            (eq
              (trs_equal_bool
                (trs_eq
                  x0
                  (car
                    (cdr
                      x1
                    )
                  )
                )
                (list 'trs_true
                )
              )
              (list 'trs_false
              )
            )
          )
          (trs_delprime
            x0
            (car
              (cdr
                (cdr
                  x1
                )
              )
            )
          )
          (list 'trs_true
          )
        )
      )
    )
    (list 'trs_true
    )
  )
)
(defun trs_equal_sort[a34] (x0 x1)
  (if
    (and
      (trs_issort[a34]
        x0
      )
      (trs_issort[a34]
        x1
      )
    )
    (if
      (and
        (eq
          (car
            x0
          )
          'trs_nil
        )
        (eq
          (car
            x1
          )
          'trs_nil
        )
      )
      (list 'trs_true
      )
      (if
        (and
          (eq
            (car
              x0
            )
            'trs_nil
          )
          (eq
            (car
              x1
            )
            'trs_cons
          )
        )
        (list 'trs_false
        )
        (if
          (and
            (eq
              (car
                x0
              )
              'trs_cons
            )
            (eq
              (car
                x1
              )
              'trs_nil
            )
          )
          (list 'trs_false
          )
          (if
            (and
            )
            (trs_and
              (trs_equal_sort[a34]
                (car
                  (cdr
                    x0
                  )
                )
                (car
                  (cdr
                    x1
                  )
                )
              )
              (trs_equal_sort[a34]
                (car
                  (cdr
                    (cdr
                      x0
                    )
                  )
                )
                (car
                  (cdr
                    (cdr
                      x1
                    )
                  )
                )
              )
            )
            (list 'trs_true
            )
          )
        )
      )
    )
    (list 'trs_true
    )
  )
)
(with-prover-time-limit 3
  (defthm test
    (implies
      (and
        (trs_issort[a34] trs_z2)
      )
      (implies
        (not
          (eq
            trs_z2
            (list 'trs_nil
            )
          )
        )
        (eq
          (trs_delprime
            (trs_max
              trs_z2
            )
            trs_z2
          )
          (list 'trs_true
          )
        )
      )
    )
    :hints (("Goal" :do-not '(generalize)))
  )
)


The following output was given by ACL2:
This is SBCL 1.0.29.11.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at .

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.

 ACL2 Version 3.6 built February 12, 2010  14:59:57.
 Copyright (C) 2009  University of Texas at Austin
 ACL2 comes with ABSOLUTELY NO WARRANTY.  This is free software and you
 are welcome to redistribute it under certain conditions.  For details,
 see the GNU General Public License.

 Initialized with (INITIALIZE-ACL2 'INCLUDE-BOOK *ACL2-PASS-2-FILES*).
 See the documentation topic note-3-6 for recent changes.
 Note: We have modified the prompt in some underlying Lisps to further
 distinguish it from the ACL2 prompt.

ACL2 Version 3.6.  Level 1.  Cbd "/home/petersk/workspace/benchmark/".
Distributed books directory "/home/petersk/download/acl2-sources/books/".
Type :help for help.
Type (good-bye) to quit completely out of ACL2.

ACL2 !> :ALL
ACL2 !>
Since TRS_ISBOOL is non-recursive, its admission is trivial.  We observe
that the type of TRS_ISBOOL is described by the theorem 
(OR (EQUAL (TRS_ISBOOL X) T) (EQUAL (TRS_ISBOOL X) NIL)).  We used
the :executable-counterpart of EQUAL and primitive type reasoning.

Summary
Form:  ( DEFUN TRS_ISBOOL ...)
Rules: ((:EXECUTABLE-COUNTERPART EQUAL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL))
Warnings:  None
Time:  0.00 seconds (prove: 0.00, print: 0.00, other: 0.00)
 TRS_ISBOOL
ACL2 !>
For the admission of TRS_ISSORT[A33] we will use the relation O< (which
is known to be well-founded on the domain recognized by O-P) and the
measure (ACL2-COUNT X).  The non-trivial part of the measure conjecture
is

Goal
(IMPLIES (AND (NOT (AND (CONSP X)
                        (EQ 'TRS_0 (CAR X))
                        (EQ (CDR X) NIL)))
              (CONSP X)
              (CONSP (CDR X))
              (EQ 'TRS_S (CAR X)))
         (O< (ACL2-COUNT (CADR X))
             (ACL2-COUNT X))).

By the simple :definition EQ we reduce the conjecture to

Goal'
(IMPLIES (AND (NOT (AND (CONSP X)
                        (EQUAL 'TRS_0 (CAR X))
                        (EQUAL (CDR X) NIL)))
              (CONSP X)
              (CONSP (CDR X))
              (EQUAL 'TRS_S (CAR X)))
         (O< (ACL2-COUNT (CADR X))
             (ACL2-COUNT X))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP and
O<, the :executable-counterparts of ACL2-COUNT and EQUAL, primitive
type reasoning, the :rewrite rule UNICITY-OF-0 and the :type-prescription
rule ACL2-COUNT, to

Goal''
(IMPLIES (AND (CONSP X)
              (CONSP (CDR X))
              (EQUAL 'TRS_S (CAR X)))
         (< (ACL2-COUNT (CADR X))
            (+ 1 (ACL2-COUNT (CDR X))))).

The destructor terms (CAR X) and (CDR X) can be eliminated.  Furthermore,
those terms are at the root of a chain of two rounds of destructor
elimination. (1) Use CAR-CDR-ELIM to replace X by (CONS X1 X2), (CAR X)
by X1 and (CDR X) by X2 and restrict the type of the new variable X1
to be that of the term it replaces.  (2) Use CAR-CDR-ELIM, again, to
replace X2 by (CONS X3 X4), (CAR X2) by X3 and (CDR X2) by X4.    These
steps produce the following goal.

Goal'''
(IMPLIES (AND (CONSP (CONS X3 X4))
              (SYMBOLP X1)
              (NOT (EQUAL X1 T))
              (NOT (EQUAL X1 NIL))
              (CONSP (LIST* X1 X3 X4))
              (EQUAL 'TRS_S X1))
         (< (ACL2-COUNT X3)
            (+ 1 (ACL2-COUNT (CONS X3 X4))))).

By case analysis we reduce the conjecture to

Goal'4'
(IMPLIES (AND (CONSP (CONS X3 X4))
              (SYMBOLP X1)
              (NOT (EQUAL X1 T))
              X1 (CONSP (LIST* X1 X3 X4))
              (EQUAL 'TRS_S X1))
         (< (ACL2-COUNT X3)
            (+ 1 (ACL2-COUNT (CONS X3 X4))))).

This simplifies, using the :definition ACL2-COUNT, the :executable-
counterparts of EQUAL, NOT and SYMBOLP, primitive type reasoning and
the :rewrite rules CAR-CONS and CDR-CONS, to

Goal'5'
(< (ACL2-COUNT X3)
   (+ 1 1 (ACL2-COUNT X3)
      (ACL2-COUNT X4))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Q.E.D.

That completes the proof of the measure theorem for TRS_ISSORT[A33].
Thus, we admit this function under the principle of definition.  We
observe that the type of TRS_ISSORT[A33] is described by the theorem
(OR (EQUAL (TRS_ISSORT[A33] X) T) (EQUAL (TRS_ISSORT[A33] X) NIL)).
We used the :executable-counterpart of EQUAL and primitive type reasoning.

Summary
Form:  ( DEFUN TRS_ISSORT[A33] ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:ELIM CAR-CDR-ELIM)
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:EXECUTABLE-COUNTERPART NOT)
        (:EXECUTABLE-COUNTERPART SYMBOLP)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE CAR-CONS)
        (:REWRITE CDR-CONS)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT))
Warnings:  None
Time:  0.01 seconds (prove: 0.01, print: 0.00, other: 0.00)
 TRS_ISSORT[A33]
ACL2 !>
Since TRS_ISSORT[A63] is non-recursive, its admission is trivial. 
We observe that the type of TRS_ISSORT[A63] is described by the theorem
(OR (EQUAL (TRS_ISSORT[A63] X) T) (EQUAL (TRS_ISSORT[A63] X) NIL)).
We used primitive type reasoning.

Summary
Form:  ( DEFUN TRS_ISSORT[A63] ...)
Rules: ((:FAKE-RUNE-FOR-TYPE-SET NIL))
Warnings:  None
Time:  0.01 seconds (prove: 0.00, print: 0.00, other: 0.01)
 TRS_ISSORT[A63]
ACL2 !>
For the admission of TRS_ISSORT[A34] we will use the relation O< (which
is known to be well-founded on the domain recognized by O-P) and the
measure (ACL2-COUNT X).  The non-trivial part of the measure conjecture
is

Goal
(IMPLIES (AND (NOT (AND (CONSP X)
                        (EQ 'TRS_NIL (CAR X))
                        (EQ (CDR X) NIL)))
              (CONSP X)
              (CONSP (CDR X))
              (CONSP (CDDR X))
              (EQ 'TRS_CONS (CAR X))
              (TRS_ISSORT[A33] (CADR X)))
         (O< (ACL2-COUNT (CADDR X))
             (ACL2-COUNT X))).

By the simple :definition EQ we reduce the conjecture to

Goal'
(IMPLIES (AND (NOT (AND (CONSP X)
                        (EQUAL 'TRS_NIL (CAR X))
                        (EQUAL (CDR X) NIL)))
              (CONSP X)
              (CONSP (CDR X))
              (CONSP (CDDR X))
              (EQUAL 'TRS_CONS (CAR X))
              (TRS_ISSORT[A33] (CADR X)))
         (O< (ACL2-COUNT (CADDR X))
             (ACL2-COUNT X))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP and
O<, the :executable-counterparts of ACL2-COUNT and EQUAL, primitive
type reasoning, the :rewrite rule UNICITY-OF-0 and the :type-prescription
rule ACL2-COUNT, to

Goal''
(IMPLIES (AND (CONSP X)
              (CONSP (CDR X))
              (CONSP (CDDR X))
              (EQUAL 'TRS_CONS (CAR X))
              (TRS_ISSORT[A33] (CADR X)))
         (< (ACL2-COUNT (CADDR X))
            (+ 1 1 (ACL2-COUNT (CADR X))
               (ACL2-COUNT (CDDR X))))).

The destructor terms (CAR X) and (CDR X) can be eliminated.  Furthermore,
those terms are at the root of a chain of three rounds of destructor
elimination. (1) Use CAR-CDR-ELIM to replace X by (CONS X1 X2), (CAR X)
by X1 and (CDR X) by X2 and restrict the type of the new variable X1
to be that of the term it replaces.  (2) Use CAR-CDR-ELIM, again, to
replace X2 by (CONS X3 X4), (CAR X2) by X3 and (CDR X2) by X4.  (3)
Finally, use CAR-CDR-ELIM to replace X4 by (CONS X5 X6), (CAR X4) by
X5 and (CDR X4) by X6.    These steps produce the following goal.

Goal'''
(IMPLIES (AND (CONSP (CONS X5 X6))
              (CONSP (LIST* X3 X5 X6))
              (SYMBOLP X1)
              (NOT (EQUAL X1 T))
              (NOT (EQUAL X1 NIL))
              (CONSP (LIST* X1 X3 X5 X6))
              (EQUAL 'TRS_CONS X1)
              (TRS_ISSORT[A33] X3))
         (< (ACL2-COUNT X5)
            (+ 1 1 (ACL2-COUNT X3)
               (ACL2-COUNT (CONS X5 X6))))).

By case analysis we reduce the conjecture to

Goal'4'
(IMPLIES (AND (CONSP (CONS X5 X6))
              (CONSP (LIST* X3 X5 X6))
              (SYMBOLP X1)
              (NOT (EQUAL X1 T))
              X1 (CONSP (LIST* X1 X3 X5 X6))
              (EQUAL 'TRS_CONS X1)
              (TRS_ISSORT[A33] X3))
         (< (ACL2-COUNT X5)
            (+ 1 1 (ACL2-COUNT X3)
               (ACL2-COUNT (CONS X5 X6))))).

This simplifies, using the :definition ACL2-COUNT, the :executable-
counterparts of EQUAL, NOT and SYMBOLP, primitive type reasoning and
the :rewrite rules CAR-CONS and CDR-CONS, to

Goal'5'
(IMPLIES (TRS_ISSORT[A33] X3)
         (< (ACL2-COUNT X5)
            (+ 1 1 (ACL2-COUNT X3)
               1 (ACL2-COUNT X5)
               (ACL2-COUNT X6)))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Q.E.D.

That completes the proof of the measure theorem for TRS_ISSORT[A34].
Thus, we admit this function under the principle of definition.  We
observe that the type of TRS_ISSORT[A34] is described by the theorem
(OR (EQUAL (TRS_ISSORT[A34] X) T) (EQUAL (TRS_ISSORT[A34] X) NIL)).
We used the :executable-counterpart of EQUAL and primitive type reasoning.

Summary
Form:  ( DEFUN TRS_ISSORT[A34] ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:ELIM CAR-CDR-ELIM)
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:EXECUTABLE-COUNTERPART NOT)
        (:EXECUTABLE-COUNTERPART SYMBOLP)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE CAR-CONS)
        (:REWRITE CDR-CONS)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT))
Warnings:  None
Time:  0.01 seconds (prove: 0.00, print: 0.00, other: 0.01)
 TRS_ISSORT[A34]
ACL2 !>
For the admission of TRS_GE we will use the relation O< (which is known
to be well-founded on the domain recognized by O-P) and the measure
(ACL2-COUNT X0).  The non-trivial part of the measure conjecture is

Goal
(IMPLIES (AND (AND (TRS_ISSORT[A33] X0)
                   (TRS_ISSORT[A33] X1))
              (NOT (EQ (CAR X1) 'TRS_0))
              (NOT (AND (EQ (CAR X0) 'TRS_0)
                        (EQ (CAR X1) 'TRS_S)))
              T)
         (O< (ACL2-COUNT (CADR X0))
             (ACL2-COUNT X0))).

By the simple :definition EQ we reduce the conjecture to

Goal'
(IMPLIES (AND (TRS_ISSORT[A33] X0)
              (TRS_ISSORT[A33] X1)
              (NOT (EQUAL (CAR X1) 'TRS_0))
              (NOT (AND (EQUAL (CAR X0) 'TRS_0)
                        (EQUAL (CAR X1) 'TRS_S))))
         (O< (ACL2-COUNT (CADR X0))
             (ACL2-COUNT X0))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<
and TRS_ISSORT[A33], the :executable-counterparts of ACL2-COUNT and
EQUAL, primitive type reasoning, the :rewrite rules COMMUTATIVITY-OF-+
and UNICITY-OF-0 and the :type-prescription rule ACL2-COUNT, to

Goal''
(IMPLIES (AND (CONSP X0)
              (CONSP (CDR X0))
              (EQUAL 'TRS_S (CAR X0))
              (TRS_ISSORT[A33] (CADR X0))
              (NOT (CDDR X0))
              (TRS_ISSORT[A33] X1)
              (NOT (EQUAL (CAR X1) 'TRS_0)))
         (< (ACL2-COUNT (CADR X0))
            (+ 1 1 (ACL2-COUNT (CADR X0))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Q.E.D.

That completes the proof of the measure theorem for TRS_GE.  Thus,
we admit this function under the principle of definition.  We observe
that the type of TRS_GE is described by the theorem 
(AND (CONSP (TRS_GE X0 X1)) (TRUE-LISTP (TRS_GE X0 X1))).  

Summary
Form:  ( DEFUN TRS_GE ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:DEFINITION TRS_ISSORT[A33])
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE COMMUTATIVITY-OF-+)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT))
Warnings:  None
Time:  0.01 seconds (prove: 0.00, print: 0.00, other: 0.01)
 TRS_GE
ACL2 !>
For the admission of TRS_EQ we will use the relation O< (which is known
to be well-founded on the domain recognized by O-P) and the measure
(ACL2-COUNT X0).  The non-trivial part of the measure conjecture is

Goal
(IMPLIES (AND (AND (TRS_ISSORT[A33] X0)
                   (TRS_ISSORT[A33] X1))
              (NOT (AND (EQ (CAR X0) 'TRS_0)
                        (EQ (CAR X1) 'TRS_0)))
              (NOT (AND (EQ (CAR X0) 'TRS_0)
                        (EQ (CAR X1) 'TRS_S)))
              (NOT (AND (EQ (CAR X0) 'TRS_S)
                        (EQ (CAR X1) 'TRS_0)))
              T)
         (O< (ACL2-COUNT (CADR X0))
             (ACL2-COUNT X0))).

By the simple :definition EQ we reduce the conjecture to

Goal'
(IMPLIES (AND (TRS_ISSORT[A33] X0)
              (TRS_ISSORT[A33] X1)
              (NOT (AND (EQUAL (CAR X0) 'TRS_0)
                        (EQUAL (CAR X1) 'TRS_0)))
              (NOT (AND (EQUAL (CAR X0) 'TRS_0)
                        (EQUAL (CAR X1) 'TRS_S)))
              (NOT (AND (EQUAL (CAR X0) 'TRS_S)
                        (EQUAL (CAR X1) 'TRS_0))))
         (O< (ACL2-COUNT (CADR X0))
             (ACL2-COUNT X0))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<
and TRS_ISSORT[A33], the :executable-counterparts of ACL2-COUNT and
EQUAL, primitive type reasoning, the :rewrite rules COMMUTATIVITY-OF-+
and UNICITY-OF-0 and the :type-prescription rule ACL2-COUNT, to

Goal''
(IMPLIES (AND (CONSP X0)
              (CONSP (CDR X0))
              (EQUAL 'TRS_S (CAR X0))
              (TRS_ISSORT[A33] (CADR X0))
              (NOT (CDDR X0))
              (TRS_ISSORT[A33] X1)
              (NOT (EQUAL (CAR X1) 'TRS_0)))
         (< (ACL2-COUNT (CADR X0))
            (+ 1 1 (ACL2-COUNT (CADR X0))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Q.E.D.

That completes the proof of the measure theorem for TRS_EQ.  Thus,
we admit this function under the principle of definition.  We observe
that the type of TRS_EQ is described by the theorem 
(AND (CONSP (TRS_EQ X0 X1)) (TRUE-LISTP (TRS_EQ X0 X1))).  We used
the :executable-counterpart of EQUAL and primitive type reasoning.

Summary
Form:  ( DEFUN TRS_EQ ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:DEFINITION TRS_ISSORT[A33])
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE COMMUTATIVITY-OF-+)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT))
Warnings:  None
Time:  0.01 seconds (prove: 0.00, print: 0.00, other: 0.01)
 TRS_EQ
ACL2 !>
Since TRS_EQUAL_SORT[A63] is non-recursive, its admission is trivial.
We observe that the type of TRS_EQUAL_SORT[A63] is described by the
theorem 
(AND (CONSP (TRS_EQUAL_SORT[A63] X0 X1))
     (TRUE-LISTP (TRS_EQUAL_SORT[A63] X0 X1))).

Summary
Form:  ( DEFUN TRS_EQUAL_SORT[A63] ...)
Rules: NIL
Warnings:  None
Time:  0.00 seconds (prove: 0.00, print: 0.00, other: 0.00)
 TRS_EQUAL_SORT[A63]
ACL2 !>
For the admission of TRS_EQUAL_SORT[A33] we will use the relation O<
(which is known to be well-founded on the domain recognized by O-P)
and the measure (ACL2-COUNT X0).  The non-trivial part of the measure
conjecture is

Goal
(IMPLIES (AND (AND (TRS_ISSORT[A33] X0)
                   (TRS_ISSORT[A33] X1))
              (NOT (AND (EQ (CAR X0) 'TRS_0)
                        (EQ (CAR X1) 'TRS_0)))
              (NOT (AND (EQ (CAR X0) 'TRS_0)
                        (EQ (CAR X1) 'TRS_S)))
              (NOT (AND (EQ (CAR X0) 'TRS_S)
                        (EQ (CAR X1) 'TRS_0)))
              T)
         (O< (ACL2-COUNT (CADR X0))
             (ACL2-COUNT X0))).

By the simple :definition EQ we reduce the conjecture to

Goal'
(IMPLIES (AND (TRS_ISSORT[A33] X0)
              (TRS_ISSORT[A33] X1)
              (NOT (AND (EQUAL (CAR X0) 'TRS_0)
                        (EQUAL (CAR X1) 'TRS_0)))
              (NOT (AND (EQUAL (CAR X0) 'TRS_0)
                        (EQUAL (CAR X1) 'TRS_S)))
              (NOT (AND (EQUAL (CAR X0) 'TRS_S)
                        (EQUAL (CAR X1) 'TRS_0))))
         (O< (ACL2-COUNT (CADR X0))
             (ACL2-COUNT X0))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<
and TRS_ISSORT[A33], the :executable-counterparts of ACL2-COUNT and
EQUAL, primitive type reasoning, the :rewrite rules COMMUTATIVITY-OF-+
and UNICITY-OF-0 and the :type-prescription rule ACL2-COUNT, to

Goal''
(IMPLIES (AND (CONSP X0)
              (CONSP (CDR X0))
              (EQUAL 'TRS_S (CAR X0))
              (TRS_ISSORT[A33] (CADR X0))
              (NOT (CDDR X0))
              (TRS_ISSORT[A33] X1)
              (NOT (EQUAL (CAR X1) 'TRS_0)))
         (< (ACL2-COUNT (CADR X0))
            (+ 1 1 (ACL2-COUNT (CADR X0))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Q.E.D.

That completes the proof of the measure theorem for TRS_EQUAL_SORT[A33].
Thus, we admit this function under the principle of definition.  We
observe that the type of TRS_EQUAL_SORT[A33] is described by the theorem
(AND (CONSP (TRS_EQUAL_SORT[A33] X0 X1))
     (TRUE-LISTP (TRS_EQUAL_SORT[A33] X0 X1))).
We used the :executable-counterpart of EQUAL and primitive type reasoning.

Summary
Form:  ( DEFUN TRS_EQUAL_SORT[A33] ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:DEFINITION TRS_ISSORT[A33])
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE COMMUTATIVITY-OF-+)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT))
Warnings:  None
Time:  0.01 seconds (prove: 0.00, print: 0.00, other: 0.01)
 TRS_EQUAL_SORT[A33]
ACL2 !>
Since TRS_ISA_FALSE is non-recursive, its admission is trivial.  We
observe that the type of TRS_ISA_FALSE is described by the theorem
(AND (CONSP (TRS_ISA_FALSE X0)) (TRUE-LISTP (TRS_ISA_FALSE X0))). 

Summary
Form:  ( DEFUN TRS_ISA_FALSE ...)
Rules: NIL
Warnings:  None
Time:  0.00 seconds (prove: 0.00, print: 0.00, other: 0.00)
 TRS_ISA_FALSE
ACL2 !>
Since TRS_ISA_TRUE is non-recursive, its admission is trivial.  We
observe that the type of TRS_ISA_TRUE is described by the theorem 
(AND (CONSP (TRS_ISA_TRUE X0)) (TRUE-LISTP (TRS_ISA_TRUE X0))).  

Summary
Form:  ( DEFUN TRS_ISA_TRUE ...)
Rules: NIL
Warnings:  None
Time:  0.00 seconds (prove: 0.00, print: 0.00, other: 0.00)
 TRS_ISA_TRUE
ACL2 !>
Since TRS_NOT is non-recursive, its admission is trivial.  We observe
that the type of TRS_NOT is described by the theorem 
(AND (CONSP (TRS_NOT X0)) (TRUE-LISTP (TRS_NOT X0))).  

Summary
Form:  ( DEFUN TRS_NOT ...)
Rules: NIL
Warnings:  None
Time:  0.01 seconds (prove: 0.00, print: 0.00, other: 0.01)
 TRS_NOT
ACL2 !>
Since TRS_OR is non-recursive, its admission is trivial.  We observe
that the type of TRS_OR is described by the theorem 
(OR (AND (CONSP (TRS_OR X0 X1))
         (TRUE-LISTP (TRS_OR X0 X1)))
    (EQUAL (TRS_OR X0 X1) X1)).

Summary
Form:  ( DEFUN TRS_OR ...)
Rules: NIL
Warnings:  None
Time:  0.00 seconds (prove: 0.00, print: 0.00, other: 0.00)
 TRS_OR
ACL2 !>
Since TRS_AND is non-recursive, its admission is trivial.  We observe
that the type of TRS_AND is described by the theorem 
(OR (AND (CONSP (TRS_AND X0 X1))
         (TRUE-LISTP (TRS_AND X0 X1)))
    (EQUAL (TRS_AND X0 X1) X1)).

Summary
Form:  ( DEFUN TRS_AND ...)
Rules: NIL
Warnings:  None
Time:  0.00 seconds (prove: 0.00, print: 0.00, other: 0.00)
 TRS_AND
ACL2 !>
Since TRS_EQUAL_BOOL is non-recursive, its admission is trivial.  We
observe that the type of TRS_EQUAL_BOOL is described by the theorem
(AND (CONSP (TRS_EQUAL_BOOL X0 X1)) (TRUE-LISTP (TRS_EQUAL_BOOL X0 X1))).
We used the :executable-counterpart of EQUAL and primitive type reasoning.

Summary
Form:  ( DEFUN TRS_EQUAL_BOOL ...)
Rules: ((:EXECUTABLE-COUNTERPART EQUAL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL))
Warnings:  None
Time:  0.01 seconds (prove: 0.00, print: 0.00, other: 0.01)
 TRS_EQUAL_BOOL
ACL2 !>
For the admission of TRS_IF1 we will use the relation O< (which is
known to be well-founded on the domain recognized by O-P) and the measure
(ACL2-COUNT X3).  The non-trivial part of the measure conjecture is

Goal
(AND (IMPLIES (AND (AND (TRS_ISBOOL X0)
                        (TRS_ISSORT[A33] X1)
                        (TRS_ISSORT[A33] X2)
                        (TRS_ISSORT[A34] X3))
                   (NOT (AND (EQ (CAR X0) 'TRS_TRUE)
                             (EQ (CAR X3) 'TRS_NIL)))
                   (AND (EQ (CAR X0) 'TRS_TRUE)
                        (EQ (CAR X3) 'TRS_CONS)))
              (O< (ACL2-COUNT (CADDR X3))
                  (ACL2-COUNT X3)))
     (IMPLIES (AND (AND (TRS_ISBOOL X0)
                        (TRS_ISSORT[A33] X1)
                        (TRS_ISSORT[A33] X2)
                        (TRS_ISSORT[A34] X3))
                   (NOT (AND (EQ (CAR X0) 'TRS_TRUE)
                             (EQ (CAR X3) 'TRS_NIL)))
                   (NOT (AND (EQ (CAR X0) 'TRS_FALSE)
                             (EQ (CAR X3) 'TRS_NIL)))
                   (AND (EQ (CAR X0) 'TRS_FALSE)
                        (EQ (CAR X3) 'TRS_CONS)))
              (O< (ACL2-COUNT (CADDR X3))
                  (ACL2-COUNT X3)))).

By the simple :definitions EQ and TRS_ISBOOL we reduce the conjecture
to the following two conjectures.

Subgoal 2
(IMPLIES (AND (CONSP X0)
              (COND ((EQUAL 'TRS_TRUE (CAR X0))
                     (EQUAL (CDR X0) NIL))
                    ((EQUAL 'TRS_FALSE (CAR X0))
                     (EQUAL (CDR X0) NIL))
                    (T NIL))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (TRS_ISSORT[A34] X3)
              (NOT (AND (EQUAL (CAR X0) 'TRS_TRUE)
                        (EQUAL (CAR X3) 'TRS_NIL)))
              (EQUAL (CAR X0) 'TRS_TRUE)
              (EQUAL (CAR X3) 'TRS_CONS))
         (O< (ACL2-COUNT (CADDR X3))
             (ACL2-COUNT X3))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<
and TRS_ISSORT[A34], the :executable-counterparts of ACL2-COUNT and
EQUAL, primitive type reasoning, the :rewrite rule UNICITY-OF-0 and
the :type-prescription rule ACL2-COUNT, to

Subgoal 2'
(IMPLIES (AND (CONSP X0)
              (NOT (CDR X0))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (CONSP X3)
              (CONSP (CDR X3))
              (CONSP (CDDR X3))
              (TRS_ISSORT[A33] (CADR X3))
              (TRS_ISSORT[A34] (CADDR X3))
              (NOT (CDDDR X3))
              (EQUAL (CAR X0) 'TRS_TRUE)
              (EQUAL (CAR X3) 'TRS_CONS))
         (< (ACL2-COUNT (CADDR X3))
            (+ 1 (ACL2-COUNT (CDR X3))))).

This simplifies, using the :definitions ACL2-COUNT and FIX, the :executable-
counterpart of ACL2-COUNT, the :rewrite rules COMMUTATIVITY-OF-+ and
UNICITY-OF-0 and the :type-prescription rule ACL2-COUNT, to

Subgoal 2''
(IMPLIES (AND (CONSP X0)
              (NOT (CDR X0))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (CONSP X3)
              (CONSP (CDR X3))
              (CONSP (CDDR X3))
              (TRS_ISSORT[A33] (CADR X3))
              (TRS_ISSORT[A34] (CADDR X3))
              (NOT (CDDDR X3))
              (EQUAL (CAR X0) 'TRS_TRUE)
              (EQUAL (CAR X3) 'TRS_CONS))
         (< (ACL2-COUNT (CADDR X3))
            (+ 1 1 (ACL2-COUNT (CADR X3))
               1 (ACL2-COUNT (CADDR X3))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Subgoal 1
(IMPLIES (AND (CONSP X0)
              (COND ((EQUAL 'TRS_TRUE (CAR X0))
                     (EQUAL (CDR X0) NIL))
                    ((EQUAL 'TRS_FALSE (CAR X0))
                     (EQUAL (CDR X0) NIL))
                    (T NIL))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (TRS_ISSORT[A34] X3)
              (NOT (AND (EQUAL (CAR X0) 'TRS_TRUE)
                        (EQUAL (CAR X3) 'TRS_NIL)))
              (NOT (AND (EQUAL (CAR X0) 'TRS_FALSE)
                        (EQUAL (CAR X3) 'TRS_NIL)))
              (EQUAL (CAR X0) 'TRS_FALSE)
              (EQUAL (CAR X3) 'TRS_CONS))
         (O< (ACL2-COUNT (CADDR X3))
             (ACL2-COUNT X3))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<
and TRS_ISSORT[A34], the :executable-counterparts of ACL2-COUNT and
EQUAL, primitive type reasoning, the :rewrite rule UNICITY-OF-0 and
the :type-prescription rule ACL2-COUNT, to

Subgoal 1'
(IMPLIES (AND (CONSP X0)
              (NOT (CDR X0))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (CONSP X3)
              (CONSP (CDR X3))
              (CONSP (CDDR X3))
              (TRS_ISSORT[A33] (CADR X3))
              (TRS_ISSORT[A34] (CADDR X3))
              (NOT (CDDDR X3))
              (EQUAL (CAR X0) 'TRS_FALSE)
              (EQUAL (CAR X3) 'TRS_CONS))
         (< (ACL2-COUNT (CADDR X3))
            (+ 1 (ACL2-COUNT (CDR X3))))).

This simplifies, using the :definitions ACL2-COUNT and FIX, the :executable-
counterpart of ACL2-COUNT, the :rewrite rules COMMUTATIVITY-OF-+ and
UNICITY-OF-0 and the :type-prescription rule ACL2-COUNT, to

Subgoal 1''
(IMPLIES (AND (CONSP X0)
              (NOT (CDR X0))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (CONSP X3)
              (CONSP (CDR X3))
              (CONSP (CDDR X3))
              (TRS_ISSORT[A33] (CADR X3))
              (TRS_ISSORT[A34] (CADDR X3))
              (NOT (CDDDR X3))
              (EQUAL (CAR X0) 'TRS_FALSE)
              (EQUAL (CAR X3) 'TRS_CONS))
         (< (ACL2-COUNT (CADDR X3))
            (+ 1 1 (ACL2-COUNT (CADR X3))
               1 (ACL2-COUNT (CADDR X3))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Q.E.D.

That completes the proof of the measure theorem for TRS_IF1.  Thus,
we admit this function under the principle of definition.  We could
deduce no constraints on the type of TRS_IF1.  However, in normalizing
the definition we used the :executable-counterpart of EQUAL and primitive
type reasoning.

Summary
Form:  ( DEFUN TRS_IF1 ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:DEFINITION TRS_ISBOOL)
        (:DEFINITION TRS_ISSORT[A34])
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE COMMUTATIVITY-OF-+)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT))
Warnings:  None
Time:  0.03 seconds (prove: 0.01, print: 0.00, other: 0.02)
 TRS_IF1
ACL2 !>
For the admission of TRS_MAX we will use the relation O< (which is
known to be well-founded on the domain recognized by O-P) and the measure
(ACL2-COUNT X0).  The non-trivial part of the measure conjecture is

Goal
(AND
 (IMPLIES (AND (TRS_ISSORT[A34] X0)
               (NOT (EQ (CAR X0) 'TRS_NIL))
               (NOT (AND (EQ (CAR X0) 'TRS_CONS)
                         (EQ (CAADDR X0) 'TRS_NIL)))
               (AND (EQ (CAR X0) 'TRS_CONS)
                    (EQ (CAADDR X0) 'TRS_CONS)
                    (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR X0) (CADADR (CDR X0)))
                                        '(TRS_TRUE))
                        '(TRS_TRUE))))
          (O< (ACL2-COUNT (LIST 'TRS_CONS
                                (CADR X0)
                                (CADDAR (CDDR X0))))
              (ACL2-COUNT X0)))
 (IMPLIES
      (AND (TRS_ISSORT[A34] X0)
           (NOT (EQ (CAR X0) 'TRS_NIL))
           (NOT (AND (EQ (CAR X0) 'TRS_CONS)
                     (EQ (CAADDR X0) 'TRS_NIL)))
           (NOT (AND (EQ (CAR X0) 'TRS_CONS)
                     (EQ (CAADDR X0) 'TRS_CONS)
                     (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR X0) (CADADR (CDR X0)))
                                         '(TRS_TRUE))
                         '(TRS_TRUE))))
           (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR X0) (CADADR (CDR X0)))
                               '(TRS_TRUE))
               '(TRS_FALSE)))
      (O< (ACL2-COUNT (LIST 'TRS_CONS
                            (CADADR (CDR X0))
                            (CADDAR (CDDR X0))))
          (ACL2-COUNT X0)))).

By the simple :definition EQ we reduce the conjecture to the following
two conjectures.

Subgoal 2
(IMPLIES (AND (TRS_ISSORT[A34] X0)
              (NOT (EQUAL (CAR X0) 'TRS_NIL))
              (NOT (AND (EQUAL (CAR X0) 'TRS_CONS)
                        (EQUAL (CAADDR X0) 'TRS_NIL)))
              (EQUAL (CAR X0) 'TRS_CONS)
              (EQUAL (CAADDR X0) 'TRS_CONS)
              (EQUAL (TRS_EQUAL_BOOL (TRS_GE (CADR X0) (CADADR (CDR X0)))
                                     '(TRS_TRUE))
                     '(TRS_TRUE)))
         (O< (ACL2-COUNT (LIST 'TRS_CONS
                               (CADR X0)
                               (CADDAR (CDDR X0))))
             (ACL2-COUNT X0))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<,
TRS_EQUAL_BOOL, TRS_ISBOOL and TRS_ISSORT[A34], the :executable-counterparts
of ACL2-COUNT, CAR, EQUAL and TRS_ISBOOL, primitive type reasoning,
the :rewrite rules CAR-CONS, CDR-CONS, COMMUTATIVITY-OF-+ and UNICITY-OF-0
and the :type-prescription rules ACL2-COUNT and TRS_GE, to the following
three conjectures.

Subgoal 2.3
(IMPLIES (AND (CONSP X0)
              (CONSP (CDR X0))
              (CONSP (CDDR X0))
              (TRS_ISSORT[A33] (CADR X0))
              (CONSP (CADDR X0))
              (CONSP (CDADDR X0))
              (CONSP (CDDADR (CDR X0)))
              (TRS_ISSORT[A33] (CADADR (CDR X0)))
              (TRS_ISSORT[A34] (CADDAR (CDDR X0)))
              (NOT (CDDDAR (CDDR X0)))
              (NOT (CDDDR X0))
              (EQUAL (CAR X0) 'TRS_CONS)
              (EQUAL (CAADDR X0) 'TRS_CONS)
              (EQUAL 'TRS_TRUE
                     (CAR (TRS_GE (CADR X0) (CADADR (CDR X0))))))
         (< (+ 1 1 (ACL2-COUNT (CADR X0))
               1 (ACL2-COUNT (CADDAR (CDDR X0))))
            (+ 1 1 (ACL2-COUNT (CADR X0))
               1 1 1 (ACL2-COUNT (CADADR (CDR X0)))
               1 (ACL2-COUNT (CADDAR (CDDR X0)))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Subgoal 2.2
(IMPLIES (AND (CONSP X0)
              (CONSP (CDR X0))
              (CONSP (CDDR X0))
              (TRS_ISSORT[A33] (CADR X0))
              (CONSP (CADDR X0))
              (CONSP (CDADDR X0))
              (CONSP (CDDADR (CDR X0)))
              (TRS_ISSORT[A33] (CADADR (CDR X0)))
              (TRS_ISSORT[A34] (CADDAR (CDDR X0)))
              (NOT (CDDDAR (CDDR X0)))
              (NOT (CDDDR X0))
              (EQUAL (CAR X0) 'TRS_CONS)
              (EQUAL (CAADDR X0) 'TRS_CONS)
              (CDR (TRS_GE (CADR X0) (CADADR (CDR X0)))))
         (< (+ 1 1 (ACL2-COUNT (CADR X0))
               1 (ACL2-COUNT (CADDAR (CDDR X0))))
            (+ 1 1 (ACL2-COUNT (CADR X0))
               1 1 1 (ACL2-COUNT (CADADR (CDR X0)))
               1 (ACL2-COUNT (CADDAR (CDDR X0)))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Subgoal 2.1
(IMPLIES (AND (CONSP X0)
              (CONSP (CDR X0))
              (CONSP (CDDR X0))
              (TRS_ISSORT[A33] (CADR X0))
              (CONSP (CADDR X0))
              (CONSP (CDADDR X0))
              (CONSP (CDDADR (CDR X0)))
              (TRS_ISSORT[A33] (CADADR (CDR X0)))
              (TRS_ISSORT[A34] (CADDAR (CDDR X0)))
              (NOT (CDDDAR (CDDR X0)))
              (NOT (CDDDR X0))
              (EQUAL (CAR X0) 'TRS_CONS)
              (EQUAL (CAADDR X0) 'TRS_CONS)
              (NOT (EQUAL 'TRS_FALSE
                          (CAR (TRS_GE (CADR X0) (CADADR (CDR X0)))))))
         (< (+ 1 1 (ACL2-COUNT (CADR X0))
               1 (ACL2-COUNT (CADDAR (CDDR X0))))
            (+ 1 1 (ACL2-COUNT (CADR X0))
               1 1 1 (ACL2-COUNT (CADADR (CDR X0)))
               1 (ACL2-COUNT (CADDAR (CDDR X0)))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Subgoal 1
(IMPLIES
   (AND (TRS_ISSORT[A34] X0)
        (NOT (EQUAL (CAR X0) 'TRS_NIL))
        (NOT (AND (EQUAL (CAR X0) 'TRS_CONS)
                  (EQUAL (CAADDR X0) 'TRS_NIL)))
        (NOT (AND (EQUAL (CAR X0) 'TRS_CONS)
                  (EQUAL (CAADDR X0) 'TRS_CONS)
                  (EQUAL (TRS_EQUAL_BOOL (TRS_GE (CADR X0) (CADADR (CDR X0)))
                                         '(TRS_TRUE))
                         '(TRS_TRUE))))
        (EQUAL (TRS_EQUAL_BOOL (TRS_GE (CADR X0) (CADADR (CDR X0)))
                               '(TRS_TRUE))
               '(TRS_FALSE)))
   (O< (ACL2-COUNT (LIST 'TRS_CONS
                         (CADADR (CDR X0))
                         (CADDAR (CDDR X0))))
       (ACL2-COUNT X0))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<,
TRS_EQUAL_BOOL, TRS_ISBOOL and TRS_ISSORT[A34], the :executable-counterparts
of ACL2-COUNT, CAR, EQUAL and TRS_ISBOOL, primitive type reasoning,
the :rewrite rules CAR-CONS, CDR-CONS, COMMUTATIVITY-OF-+ and UNICITY-OF-0
and the :type-prescription rules ACL2-COUNT and TRS_GE, to

Subgoal 1'
(IMPLIES (AND (CONSP X0)
              (CONSP (CDR X0))
              (CONSP (CDDR X0))
              (EQUAL 'TRS_CONS (CAR X0))
              (TRS_ISSORT[A33] (CADR X0))
              (CONSP (CADDR X0))
              (CONSP (CDADDR X0))
              (CONSP (CDDADR (CDR X0)))
              (EQUAL 'TRS_CONS (CAADDR X0))
              (TRS_ISSORT[A33] (CADADR (CDR X0)))
              (TRS_ISSORT[A34] (CADDAR (CDDR X0)))
              (NOT (CDDDAR (CDDR X0)))
              (NOT (CDDDR X0))
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_GE (CADR X0) (CADADR (CDR X0)))))
              (NOT (CDR (TRS_GE (CADR X0) (CADADR (CDR X0))))))
         (< (+ 1 1 (ACL2-COUNT (CADADR (CDR X0)))
               1 (ACL2-COUNT (CADDAR (CDDR X0))))
            (+ 1 1 (ACL2-COUNT (CADR X0))
               1 1 1 (ACL2-COUNT (CADADR (CDR X0)))
               1 (ACL2-COUNT (CADDAR (CDDR X0)))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Q.E.D.

That completes the proof of the measure theorem for TRS_MAX.  Thus,
we admit this function under the principle of definition.  We could
deduce no constraints on the type of TRS_MAX.  However, in normalizing
the definition we used primitive type reasoning.

Summary
Form:  ( DEFUN TRS_MAX ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:DEFINITION TRS_EQUAL_BOOL)
        (:DEFINITION TRS_ISBOOL)
        (:DEFINITION TRS_ISSORT[A34])
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART CAR)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:EXECUTABLE-COUNTERPART TRS_ISBOOL)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE CAR-CONS)
        (:REWRITE CDR-CONS)
        (:REWRITE COMMUTATIVITY-OF-+)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT)
        (:TYPE-PRESCRIPTION TRS_GE))
Warnings:  None
Time:  0.03 seconds (prove: 0.02, print: 0.00, other: 0.01)
 TRS_MAX
ACL2 !>
For the admission of TRS_IF2 we will use the relation O< (which is
known to be well-founded on the domain recognized by O-P) and the measure
(ACL2-COUNT X3).  The non-trivial part of the measure conjecture is

Goal
(IMPLIES (AND (AND (TRS_ISBOOL X0)
                   (TRS_ISSORT[A33] X1)
                   (TRS_ISSORT[A33] X2)
                   (TRS_ISSORT[A34] X3))
              (NOT (EQ (CAR X0) 'TRS_TRUE))
              (NOT (AND (EQ (CAR X0) 'TRS_FALSE)
                        (EQ (CAR X3) 'TRS_NIL)))
              T)
         (O< (ACL2-COUNT (CADDR X3))
             (ACL2-COUNT X3))).

By the simple :definitions EQ and TRS_ISBOOL we reduce the conjecture
to

Goal'
(IMPLIES (AND (CONSP X0)
              (COND ((EQUAL 'TRS_TRUE (CAR X0))
                     (EQUAL (CDR X0) NIL))
                    ((EQUAL 'TRS_FALSE (CAR X0))
                     (EQUAL (CDR X0) NIL))
                    (T NIL))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (TRS_ISSORT[A34] X3)
              (NOT (EQUAL (CAR X0) 'TRS_TRUE))
              (NOT (AND (EQUAL (CAR X0) 'TRS_FALSE)
                        (EQUAL (CAR X3) 'TRS_NIL))))
         (O< (ACL2-COUNT (CADDR X3))
             (ACL2-COUNT X3))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<
and TRS_ISSORT[A34], the :executable-counterparts of ACL2-COUNT and
EQUAL, primitive type reasoning, the :rewrite rule UNICITY-OF-0 and
the :type-prescription rule ACL2-COUNT, to

Goal''
(IMPLIES (AND (CONSP X0)
              (EQUAL 'TRS_FALSE (CAR X0))
              (NOT (CDR X0))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (CONSP X3)
              (CONSP (CDR X3))
              (CONSP (CDDR X3))
              (EQUAL 'TRS_CONS (CAR X3))
              (TRS_ISSORT[A33] (CADR X3))
              (TRS_ISSORT[A34] (CADDR X3))
              (NOT (CDDDR X3)))
         (< (ACL2-COUNT (CADDR X3))
            (+ 1 (ACL2-COUNT (CDR X3))))).

This simplifies, using the :definitions ACL2-COUNT and FIX, the :executable-
counterpart of ACL2-COUNT, the :rewrite rules COMMUTATIVITY-OF-+ and
UNICITY-OF-0 and the :type-prescription rule ACL2-COUNT, to

Goal'''
(IMPLIES (AND (CONSP X0)
              (EQUAL 'TRS_FALSE (CAR X0))
              (NOT (CDR X0))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (CONSP X3)
              (CONSP (CDR X3))
              (CONSP (CDDR X3))
              (EQUAL 'TRS_CONS (CAR X3))
              (TRS_ISSORT[A33] (CADR X3))
              (TRS_ISSORT[A34] (CADDR X3))
              (NOT (CDDDR X3)))
         (< (ACL2-COUNT (CADDR X3))
            (+ 1 1 (ACL2-COUNT (CADR X3))
               1 (ACL2-COUNT (CADDR X3))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Q.E.D.

That completes the proof of the measure theorem for TRS_IF2.  Thus,
we admit this function under the principle of definition.  We observe
that the type of TRS_IF2 is described by the theorem 
(OR (AND (CONSP (TRS_IF2 X0 X1 X2 X3))
         (TRUE-LISTP (TRS_IF2 X0 X1 X2 X3)))
    (EQUAL (TRS_IF2 X0 X1 X2 X3) X3)).
We used primitive type reasoning.

Summary
Form:  ( DEFUN TRS_IF2 ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:DEFINITION TRS_ISBOOL)
        (:DEFINITION TRS_ISSORT[A34])
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE COMMUTATIVITY-OF-+)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT))
Warnings:  None
Time:  0.01 seconds (prove: 0.00, print: 0.01, other: 0.00)
 TRS_IF2
ACL2 !>
For the admission of TRS_IF2PRIME we will use the relation O< (which
is known to be well-founded on the domain recognized by O-P) and the
measure (ACL2-COUNT X3).  The non-trivial part of the measure conjecture
is

Goal
(IMPLIES (AND (AND (TRS_ISBOOL X0)
                   (TRS_ISSORT[A33] X1)
                   (TRS_ISSORT[A33] X2)
                   (TRS_ISSORT[A34] X3))
              (NOT (EQ (CAR X0) 'TRS_TRUE))
              (NOT (AND (EQ (CAR X0) 'TRS_FALSE)
                        (EQ (CAR X3) 'TRS_NIL)))
              T)
         (O< (ACL2-COUNT (CADDR X3))
             (ACL2-COUNT X3))).

By the simple :definitions EQ and TRS_ISBOOL we reduce the conjecture
to

Goal'
(IMPLIES (AND (CONSP X0)
              (COND ((EQUAL 'TRS_TRUE (CAR X0))
                     (EQUAL (CDR X0) NIL))
                    ((EQUAL 'TRS_FALSE (CAR X0))
                     (EQUAL (CDR X0) NIL))
                    (T NIL))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (TRS_ISSORT[A34] X3)
              (NOT (EQUAL (CAR X0) 'TRS_TRUE))
              (NOT (AND (EQUAL (CAR X0) 'TRS_FALSE)
                        (EQUAL (CAR X3) 'TRS_NIL))))
         (O< (ACL2-COUNT (CADDR X3))
             (ACL2-COUNT X3))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<
and TRS_ISSORT[A34], the :executable-counterparts of ACL2-COUNT and
EQUAL, primitive type reasoning, the :rewrite rule UNICITY-OF-0 and
the :type-prescription rule ACL2-COUNT, to

Goal''
(IMPLIES (AND (CONSP X0)
              (EQUAL 'TRS_FALSE (CAR X0))
              (NOT (CDR X0))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (CONSP X3)
              (CONSP (CDR X3))
              (CONSP (CDDR X3))
              (EQUAL 'TRS_CONS (CAR X3))
              (TRS_ISSORT[A33] (CADR X3))
              (TRS_ISSORT[A34] (CADDR X3))
              (NOT (CDDDR X3)))
         (< (ACL2-COUNT (CADDR X3))
            (+ 1 (ACL2-COUNT (CDR X3))))).

This simplifies, using the :definitions ACL2-COUNT and FIX, the :executable-
counterpart of ACL2-COUNT, the :rewrite rules COMMUTATIVITY-OF-+ and
UNICITY-OF-0 and the :type-prescription rule ACL2-COUNT, to

Goal'''
(IMPLIES (AND (CONSP X0)
              (EQUAL 'TRS_FALSE (CAR X0))
              (NOT (CDR X0))
              (TRS_ISSORT[A33] X1)
              (TRS_ISSORT[A33] X2)
              (CONSP X3)
              (CONSP (CDR X3))
              (CONSP (CDDR X3))
              (EQUAL 'TRS_CONS (CAR X3))
              (TRS_ISSORT[A33] (CADR X3))
              (TRS_ISSORT[A34] (CADDR X3))
              (NOT (CDDDR X3)))
         (< (ACL2-COUNT (CADDR X3))
            (+ 1 1 (ACL2-COUNT (CADR X3))
               1 (ACL2-COUNT (CADDR X3))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Q.E.D.

That completes the proof of the measure theorem for TRS_IF2PRIME. 
Thus, we admit this function under the principle of definition.  We
observe that the type of TRS_IF2PRIME is described by the theorem 
(AND (CONSP (TRS_IF2PRIME X0 X1 X2 X3))
     (TRUE-LISTP (TRS_IF2PRIME X0 X1 X2 X3))).

Summary
Form:  ( DEFUN TRS_IF2PRIME ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:DEFINITION TRS_ISBOOL)
        (:DEFINITION TRS_ISSORT[A34])
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE COMMUTATIVITY-OF-+)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT))
Warnings:  None
Time:  0.02 seconds (prove: 0.00, print: 0.00, other: 0.02)
 TRS_IF2PRIME
ACL2 !>
For the admission of TRS_DEL we will use the relation O< (which is
known to be well-founded on the domain recognized by O-P) and the measure
(ACL2-COUNT X1).  The non-trivial part of the measure conjecture is

Goal
(IMPLIES (AND (AND (TRS_ISSORT[A33] X0)
                   (TRS_ISSORT[A34] X1))
              (NOT (EQ (CAR X1) 'TRS_NIL))
              (NOT (AND (EQ (CAR X1) 'TRS_CONS)
                        (EQ (TRS_EQUAL_BOOL (TRS_EQ X0 (CADR X1))
                                            '(TRS_TRUE))
                            '(TRS_TRUE))))
              (EQ (TRS_EQUAL_BOOL (TRS_EQ X0 (CADR X1))
                                  '(TRS_TRUE))
                  '(TRS_FALSE)))
         (O< (ACL2-COUNT (CADDR X1))
             (ACL2-COUNT X1))).

By the simple :definition EQ we reduce the conjecture to

Goal'
(IMPLIES (AND (TRS_ISSORT[A33] X0)
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X1) 'TRS_NIL))
              (NOT (AND (EQUAL (CAR X1) 'TRS_CONS)
                        (EQUAL (TRS_EQUAL_BOOL (TRS_EQ X0 (CADR X1))
                                               '(TRS_TRUE))
                               '(TRS_TRUE))))
              (EQUAL (TRS_EQUAL_BOOL (TRS_EQ X0 (CADR X1))
                                     '(TRS_TRUE))
                     '(TRS_FALSE)))
         (O< (ACL2-COUNT (CADDR X1))
             (ACL2-COUNT X1))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<,
TRS_EQUAL_BOOL, TRS_ISBOOL and TRS_ISSORT[A34], the :executable-counterparts
of ACL2-COUNT, CAR, EQUAL and TRS_ISBOOL, primitive type reasoning,
the :rewrite rules COMMUTATIVITY-OF-+ and UNICITY-OF-0 and the :type-
prescription rules ACL2-COUNT and TRS_EQ, to

Goal''
(IMPLIES (AND (TRS_ISSORT[A33] X0)
              (CONSP X1)
              (CONSP (CDR X1))
              (CONSP (CDDR X1))
              (EQUAL 'TRS_CONS (CAR X1))
              (TRS_ISSORT[A33] (CADR X1))
              (TRS_ISSORT[A34] (CADDR X1))
              (NOT (CDDDR X1))
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ X0 (CADR X1))))
              (NOT (CDR (TRS_EQ X0 (CADR X1)))))
         (< (ACL2-COUNT (CADDR X1))
            (+ 1 1 (ACL2-COUNT (CADR X1))
               1 (ACL2-COUNT (CADDR X1))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Q.E.D.

That completes the proof of the measure theorem for TRS_DEL.  Thus,
we admit this function under the principle of definition.  We could
deduce no constraints on the type of TRS_DEL.

Summary
Form:  ( DEFUN TRS_DEL ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:DEFINITION TRS_EQUAL_BOOL)
        (:DEFINITION TRS_ISBOOL)
        (:DEFINITION TRS_ISSORT[A34])
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART CAR)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:EXECUTABLE-COUNTERPART TRS_ISBOOL)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE COMMUTATIVITY-OF-+)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT)
        (:TYPE-PRESCRIPTION TRS_EQ))
Warnings:  None
Time:  0.01 seconds (prove: 0.00, print: 0.00, other: 0.01)
 TRS_DEL
ACL2 !>
For the admission of TRS_DELPRIME we will use the relation O< (which
is known to be well-founded on the domain recognized by O-P) and the
measure (ACL2-COUNT X1).  The non-trivial part of the measure conjecture
is

Goal
(IMPLIES (AND (AND (TRS_ISSORT[A33] X0)
                   (TRS_ISSORT[A34] X1))
              (NOT (EQ (CAR X1) 'TRS_NIL))
              (NOT (AND (EQ (CAR X1) 'TRS_CONS)
                        (EQ (TRS_EQUAL_BOOL (TRS_EQ X0 (CADR X1))
                                            '(TRS_TRUE))
                            '(TRS_TRUE))))
              (EQ (TRS_EQUAL_BOOL (TRS_EQ X0 (CADR X1))
                                  '(TRS_TRUE))
                  '(TRS_FALSE)))
         (O< (ACL2-COUNT (CADDR X1))
             (ACL2-COUNT X1))).

By the simple :definition EQ we reduce the conjecture to

Goal'
(IMPLIES (AND (TRS_ISSORT[A33] X0)
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X1) 'TRS_NIL))
              (NOT (AND (EQUAL (CAR X1) 'TRS_CONS)
                        (EQUAL (TRS_EQUAL_BOOL (TRS_EQ X0 (CADR X1))
                                               '(TRS_TRUE))
                               '(TRS_TRUE))))
              (EQUAL (TRS_EQUAL_BOOL (TRS_EQ X0 (CADR X1))
                                     '(TRS_TRUE))
                     '(TRS_FALSE)))
         (O< (ACL2-COUNT (CADDR X1))
             (ACL2-COUNT X1))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<,
TRS_EQUAL_BOOL, TRS_ISBOOL and TRS_ISSORT[A34], the :executable-counterparts
of ACL2-COUNT, CAR, EQUAL and TRS_ISBOOL, primitive type reasoning,
the :rewrite rules COMMUTATIVITY-OF-+ and UNICITY-OF-0 and the :type-
prescription rules ACL2-COUNT and TRS_EQ, to

Goal''
(IMPLIES (AND (TRS_ISSORT[A33] X0)
              (CONSP X1)
              (CONSP (CDR X1))
              (CONSP (CDDR X1))
              (EQUAL 'TRS_CONS (CAR X1))
              (TRS_ISSORT[A33] (CADR X1))
              (TRS_ISSORT[A34] (CADDR X1))
              (NOT (CDDDR X1))
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ X0 (CADR X1))))
              (NOT (CDR (TRS_EQ X0 (CADR X1)))))
         (< (ACL2-COUNT (CADDR X1))
            (+ 1 1 (ACL2-COUNT (CADR X1))
               1 (ACL2-COUNT (CADDR X1))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Q.E.D.

That completes the proof of the measure theorem for TRS_DELPRIME. 
Thus, we admit this function under the principle of definition.  We
observe that the type of TRS_DELPRIME is described by the theorem 
(AND (CONSP (TRS_DELPRIME X0 X1)) (TRUE-LISTP (TRS_DELPRIME X0 X1))).

Summary
Form:  ( DEFUN TRS_DELPRIME ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:DEFINITION TRS_EQUAL_BOOL)
        (:DEFINITION TRS_ISBOOL)
        (:DEFINITION TRS_ISSORT[A34])
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART CAR)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:EXECUTABLE-COUNTERPART TRS_ISBOOL)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE COMMUTATIVITY-OF-+)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT)
        (:TYPE-PRESCRIPTION TRS_EQ))
Warnings:  None
Time:  0.01 seconds (prove: 0.00, print: 0.00, other: 0.01)
 TRS_DELPRIME
ACL2 !>
For the admission of TRS_EQUAL_SORT[A34] we will use the relation O<
(which is known to be well-founded on the domain recognized by O-P)
and the measure (ACL2-COUNT X0).  The non-trivial part of the measure
conjecture is

Goal
(AND (IMPLIES (AND (AND (TRS_ISSORT[A34] X0)
                        (TRS_ISSORT[A34] X1))
                   (NOT (AND (EQ (CAR X0) 'TRS_NIL)
                             (EQ (CAR X1) 'TRS_NIL)))
                   (NOT (AND (EQ (CAR X0) 'TRS_NIL)
                             (EQ (CAR X1) 'TRS_CONS)))
                   (NOT (AND (EQ (CAR X0) 'TRS_CONS)
                             (EQ (CAR X1) 'TRS_NIL)))
                   T)
              (O< (ACL2-COUNT (CADDR X0))
                  (ACL2-COUNT X0)))
     (IMPLIES (AND (AND (TRS_ISSORT[A34] X0)
                        (TRS_ISSORT[A34] X1))
                   (NOT (AND (EQ (CAR X0) 'TRS_NIL)
                             (EQ (CAR X1) 'TRS_NIL)))
                   (NOT (AND (EQ (CAR X0) 'TRS_NIL)
                             (EQ (CAR X1) 'TRS_CONS)))
                   (NOT (AND (EQ (CAR X0) 'TRS_CONS)
                             (EQ (CAR X1) 'TRS_NIL)))
                   T)
              (O< (ACL2-COUNT (CADR X0))
                  (ACL2-COUNT X0)))).

By the simple :definition EQ we reduce the conjecture to the following
two conjectures.

Subgoal 2
(IMPLIES (AND (TRS_ISSORT[A34] X0)
              (TRS_ISSORT[A34] X1)
              (NOT (AND (EQUAL (CAR X0) 'TRS_NIL)
                        (EQUAL (CAR X1) 'TRS_NIL)))
              (NOT (AND (EQUAL (CAR X0) 'TRS_NIL)
                        (EQUAL (CAR X1) 'TRS_CONS)))
              (NOT (AND (EQUAL (CAR X0) 'TRS_CONS)
                        (EQUAL (CAR X1) 'TRS_NIL))))
         (O< (ACL2-COUNT (CADDR X0))
             (ACL2-COUNT X0))).

This simplifies, using the :definitions ACL2-COUNT, FIX, O-FINP, O<
and TRS_ISSORT[A34], the :executable-counterparts of ACL2-COUNT and
EQUAL, primitive type reasoning, the :rewrite rule UNICITY-OF-0 and
the :type-prescription rule ACL2-COUNT, to

Subgoal 2'
(IMPLIES (AND (CONSP X0)
              (CONSP (CDR X0))
              (CONSP (CDDR X0))
              (EQUAL 'TRS_CONS (CAR X0))
              (TRS_ISSORT[A33] (CADR X0))
              (TRS_ISSORT[A34] (CADDR X0))
              (NOT (CDDDR X0))
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X1) 'TRS_NIL)))
         (< (ACL2-COUNT (CADDR X0))
            (+ 1 (ACL2-COUNT (CDR X0))))).

This simplifies, using the :definitions ACL2-COUNT and FIX, the :executable-
counterpart of ACL2-COUNT, the :rewrite rules COMMUTATIVITY-OF-+ and
UNICITY-OF-0 and the :type-prescription rule ACL2-COUNT, to

Subgoal 2''
(IMPLIES (AND (CONSP X0)
              (CONSP (CDR X0))
              (CONSP (CDDR X0))
              (EQUAL 'TRS_CONS (CAR X0))
              (TRS_ISSORT[A33] (CADR X0))
              (TRS_ISSORT[A34] (CADDR X0))
              (NOT (CDDDR X0))
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X1) 'TRS_NIL)))
         (< (ACL2-COUNT (CADDR X0))
            (+ 1 1 (ACL2-COUNT (CADR X0))
               1 (ACL2-COUNT (CADDR X0))))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Subgoal 1
(IMPLIES (AND (TRS_ISSORT[A34] X0)
              (TRS_ISSORT[A34] X1)
              (NOT (AND (EQUAL (CAR X0) 'TRS_NIL)
                        (EQUAL (CAR X1) 'TRS_NIL)))
              (NOT (AND (EQUAL (CAR X0) 'TRS_NIL)
                        (EQUAL (CAR X1) 'TRS_CONS)))
              (NOT (AND (EQUAL (CAR X0) 'TRS_CONS)
                        (EQUAL (CAR X1) 'TRS_NIL))))
         (O< (ACL2-COUNT (CADR X0))
             (ACL2-COUNT X0))).

This simplifies, using the :definitions O-FINP and O< and the :type-
prescription rule ACL2-COUNT, to the following four conjectures.

Subgoal 1.4
(IMPLIES (AND (TRS_ISSORT[A34] X0)
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X0) 'TRS_NIL))
              (NOT (EQUAL (CAR X0) 'TRS_CONS)))
         (< (ACL2-COUNT (CADR X0))
            (ACL2-COUNT X0))).

But simplification reduces this to T, using the :definition TRS_ISSORT[A34].

Subgoal 1.3
(IMPLIES (AND (TRS_ISSORT[A34] X0)
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X0) 'TRS_NIL))
              (NOT (EQUAL (CAR X1) 'TRS_NIL)))
         (< (ACL2-COUNT (CADR X0))
            (ACL2-COUNT X0))).

The destructor terms (CAR X0) and (CDR X0) can be eliminated.  Furthermore,
those terms are at the root of a chain of two rounds of destructor
elimination. (1) Use CAR-CDR-ELIM to replace X0 by (CONS X2 X3), (CAR X0)
by X2 and (CDR X0) by X3.  (2) Use CAR-CDR-ELIM, again, to replace
X3 by (CONS X4 X5), (CAR X3) by X4 and (CDR X3) by X5.    These steps
produce the following three goals.

Subgoal 1.3.3
(IMPLIES (AND (NOT (CONSP X0))
              (TRS_ISSORT[A34] X0)
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X0) 'TRS_NIL))
              (NOT (EQUAL (CAR X1) 'TRS_NIL)))
         (< (ACL2-COUNT (CADR X0))
            (ACL2-COUNT X0))).

But simplification reduces this to T, using the :definition TRS_ISSORT[A34].

Subgoal 1.3.2
(IMPLIES (AND (NOT (CONSP X3))
              (CONSP (CONS X2 X3))
              (TRS_ISSORT[A34] (CONS X2 X3))
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL X2 'TRS_NIL))
              (NOT (EQUAL (CAR X1) 'TRS_NIL)))
         (< (ACL2-COUNT (CAR X3))
            (ACL2-COUNT (CONS X2 X3)))).

But simplification reduces this to T, using the :definition TRS_ISSORT[A34],
primitive type reasoning and the :rewrite rules CAR-CONS and CDR-CONS.

Subgoal 1.3.1
(IMPLIES (AND (CONSP (CONS X4 X5))
              (CONSP (LIST* X2 X4 X5))
              (TRS_ISSORT[A34] (LIST* X2 X4 X5))
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL X2 'TRS_NIL))
              (NOT (EQUAL (CAR X1) 'TRS_NIL)))
         (< (ACL2-COUNT X4)
            (ACL2-COUNT (LIST* X2 X4 X5)))).

This simplifies, using the :definitions ACL2-COUNT, FIX and TRS_ISSORT[A34],
the :executable-counterparts of ACL2-COUNT and EQUAL, primitive type
reasoning, the :rewrite rules CAR-CONS, CDR-CONS and UNICITY-OF-0 and
the :type-prescription rule ACL2-COUNT, to

Subgoal 1.3.1'
(IMPLIES (AND (CONSP X5)
              (EQUAL 'TRS_CONS X2)
              (TRS_ISSORT[A33] X4)
              (TRS_ISSORT[A34] (CAR X5))
              (NOT (CDR X5))
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X1) 'TRS_NIL)))
         (< (ACL2-COUNT X4)
            (+ 1 1 (ACL2-COUNT X4)
               (ACL2-COUNT X5)))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Subgoal 1.2
(IMPLIES (AND (TRS_ISSORT[A34] X0)
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X1) 'TRS_NIL))
              (NOT (EQUAL (CAR X0) 'TRS_NIL)))
         (< (ACL2-COUNT (CADR X0))
            (ACL2-COUNT X0))).

The destructor terms (CAR X0) and (CDR X0) can be eliminated.  Furthermore,
those terms are at the root of a chain of two rounds of destructor
elimination. (1) Use CAR-CDR-ELIM to replace X0 by (CONS X2 X3), (CAR X0)
by X2 and (CDR X0) by X3.  (2) Use CAR-CDR-ELIM, again, to replace
X3 by (CONS X4 X5), (CAR X3) by X4 and (CDR X3) by X5.    These steps
produce the following three goals.

Subgoal 1.2.3
(IMPLIES (AND (NOT (CONSP X0))
              (TRS_ISSORT[A34] X0)
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X1) 'TRS_NIL))
              (NOT (EQUAL (CAR X0) 'TRS_NIL)))
         (< (ACL2-COUNT (CADR X0))
            (ACL2-COUNT X0))).

But simplification reduces this to T, using the :definition TRS_ISSORT[A34].

Subgoal 1.2.2
(IMPLIES (AND (NOT (CONSP X3))
              (CONSP (CONS X2 X3))
              (TRS_ISSORT[A34] (CONS X2 X3))
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X1) 'TRS_NIL))
              (NOT (EQUAL X2 'TRS_NIL)))
         (< (ACL2-COUNT (CAR X3))
            (ACL2-COUNT (CONS X2 X3)))).

But simplification reduces this to T, using the :definition TRS_ISSORT[A34],
primitive type reasoning and the :rewrite rules CAR-CONS and CDR-CONS.

Subgoal 1.2.1
(IMPLIES (AND (CONSP (CONS X4 X5))
              (CONSP (LIST* X2 X4 X5))
              (TRS_ISSORT[A34] (LIST* X2 X4 X5))
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X1) 'TRS_NIL))
              (NOT (EQUAL X2 'TRS_NIL)))
         (< (ACL2-COUNT X4)
            (ACL2-COUNT (LIST* X2 X4 X5)))).

This simplifies, using the :definitions ACL2-COUNT, FIX and TRS_ISSORT[A34],
the :executable-counterparts of ACL2-COUNT and EQUAL, primitive type
reasoning, the :rewrite rules CAR-CONS, CDR-CONS and UNICITY-OF-0 and
the :type-prescription rule ACL2-COUNT, to

Subgoal 1.2.1'
(IMPLIES (AND (CONSP X5)
              (EQUAL 'TRS_CONS X2)
              (TRS_ISSORT[A33] X4)
              (TRS_ISSORT[A34] (CAR X5))
              (NOT (CDR X5))
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X1) 'TRS_NIL)))
         (< (ACL2-COUNT X4)
            (+ 1 1 (ACL2-COUNT X4)
               (ACL2-COUNT X5)))).

But simplification reduces this to T, using linear arithmetic, primitive
type reasoning and the :type-prescription rule ACL2-COUNT.

Subgoal 1.1
(IMPLIES (AND (TRS_ISSORT[A34] X0)
              (TRS_ISSORT[A34] X1)
              (NOT (EQUAL (CAR X1) 'TRS_NIL))
              (NOT (EQUAL (CAR X1) 'TRS_CONS)))
         (< (ACL2-COUNT (CADR X0))
            (ACL2-COUNT X0))).

But simplification reduces this to T, using the :definition TRS_ISSORT[A34].

Q.E.D.

That completes the proof of the measure theorem for TRS_EQUAL_SORT[A34].
Thus, we admit this function under the principle of definition.  We
observe that the type of TRS_EQUAL_SORT[A34] is described by the theorem
(AND (CONSP (TRS_EQUAL_SORT[A34] X0 X1))
     (TRUE-LISTP (TRS_EQUAL_SORT[A34] X0 X1))).
We used the :executable-counterpart of EQUAL, primitive type reasoning
and the :type-prescription rule TRS_AND.

Summary
Form:  ( DEFUN TRS_EQUAL_SORT[A34] ...)
Rules: ((:DEFINITION ACL2-COUNT)
        (:DEFINITION EQ)
        (:DEFINITION FIX)
        (:DEFINITION NOT)
        (:DEFINITION O-FINP)
        (:DEFINITION O<)
        (:DEFINITION TRS_ISSORT[A34])
        (:ELIM CAR-CDR-ELIM)
        (:EXECUTABLE-COUNTERPART ACL2-COUNT)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:FAKE-RUNE-FOR-LINEAR NIL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:REWRITE CAR-CONS)
        (:REWRITE CDR-CONS)
        (:REWRITE COMMUTATIVITY-OF-+)
        (:REWRITE UNICITY-OF-0)
        (:TYPE-PRESCRIPTION ACL2-COUNT)
        (:TYPE-PRESCRIPTION TRS_AND))
Warnings:  None
Time:  0.03 seconds (prove: 0.02, print: 0.00, other: 0.01)
 TRS_EQUAL_SORT[A34]
ACL2 !>
[Note:  A hint was supplied for our processing of the goal above. 
Thanks!]

By the simple :definition EQ we reduce the conjecture to

Goal'
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

Name the formula above *1.

Perhaps we can prove *1 by induction.  Three induction schemes are
suggested by this conjecture.  These merge into two derived induction
schemes.  By considering those suggested by the largest number of non-
primitive recursive functions, we narrow the field to one.  

We will induct according to a scheme suggested by (TRS_MAX TRS_Z2).
This suggestion was produced using the :induction rule TRS_MAX.  If
we let (:P TRS_Z2) denote *1 above then the induction scheme we'll
use is
(AND
   (IMPLIES (NOT (TRS_ISSORT[A34] TRS_Z2))
            (:P TRS_Z2))
   (IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
                 (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
                 (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                           (EQ (CAADDR TRS_Z2) 'TRS_NIL)))
                 (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                           (EQ (CAADDR TRS_Z2) 'TRS_CONS)
                           (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                       (CADADR (CDR TRS_Z2)))
                                               '(TRS_TRUE))
                               '(TRS_TRUE))))
                 (NOT (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                  (CADADR (CDR TRS_Z2)))
                                          '(TRS_TRUE))
                          '(TRS_FALSE))))
            (:P TRS_Z2))
   (IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
                 (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
                 (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                           (EQ (CAADDR TRS_Z2) 'TRS_NIL)))
                 (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                           (EQ (CAADDR TRS_Z2) 'TRS_CONS)
                           (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                       (CADADR (CDR TRS_Z2)))
                                               '(TRS_TRUE))
                               '(TRS_TRUE))))
                 (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                             (CADADR (CDR TRS_Z2)))
                                     '(TRS_TRUE))
                     '(TRS_FALSE))
                 (:P (LIST 'TRS_CONS
                           (CADADR (CDR TRS_Z2))
                           (CADDAR (CDDR TRS_Z2)))))
            (:P TRS_Z2))
   (IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
                 (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
                 (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                           (EQ (CAADDR TRS_Z2) 'TRS_NIL)))
                 (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                      (EQ (CAADDR TRS_Z2) 'TRS_CONS)
                      (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                  (CADADR (CDR TRS_Z2)))
                                          '(TRS_TRUE))
                          '(TRS_TRUE)))
                 (:P (LIST 'TRS_CONS
                           (CADR TRS_Z2)
                           (CADDAR (CDDR TRS_Z2)))))
            (:P TRS_Z2))
   (IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
                 (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
                 (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                      (EQ (CAADDR TRS_Z2) 'TRS_NIL)))
            (:P TRS_Z2))
   (IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
                 (EQ (CAR TRS_Z2) 'TRS_NIL))
            (:P TRS_Z2))).
This induction is justified by the same argument used to admit TRS_MAX.
When applied to the goal at hand the above induction scheme produces
nine nontautological subgoals.

Subgoal *1/9
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                        (EQ (CAADDR TRS_Z2) 'TRS_NIL)))
              (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                        (EQ (CAADDR TRS_Z2) 'TRS_CONS)
                        (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                    (CADADR (CDR TRS_Z2)))
                                            '(TRS_TRUE))
                            '(TRS_TRUE))))
              (NOT (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                               (CADADR (CDR TRS_Z2)))
                                       '(TRS_TRUE))
                       '(TRS_FALSE)))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

By the simple :definition EQ we reduce the conjecture to

Subgoal *1/9'
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQUAL (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQUAL (CAR TRS_Z2) 'TRS_CONS)
                        (EQUAL (CAADDR TRS_Z2) 'TRS_NIL)))
              (NOT (AND (EQUAL (CAR TRS_Z2) 'TRS_CONS)
                        (EQUAL (CAADDR TRS_Z2) 'TRS_CONS)
                        (EQUAL (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                       (CADADR (CDR TRS_Z2)))
                                               '(TRS_TRUE))
                               '(TRS_TRUE))))
              (NOT (EQUAL (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                  (CADADR (CDR TRS_Z2)))
                                          '(TRS_TRUE))
                          '(TRS_FALSE)))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

This simplifies, using the :definitions TRS_EQUAL_BOOL, TRS_ISBOOL,
TRS_ISSORT[A34] and TRS_MAX, the :executable-counterparts of CAR, EQUAL
and TRS_ISBOOL, primitive type reasoning and the :type-prescription
rules TRS_GE, TRS_ISSORT[A33] and TRS_ISSORT[A34], to the following
three conjectures.

Subgoal *1/9.3
(IMPLIES (AND (CONSP TRS_Z2)
              (CONSP (CDR TRS_Z2))
              (CONSP (CDDR TRS_Z2))
              (EQUAL 'TRS_CONS (CAR TRS_Z2))
              (TRS_ISSORT[A33] (CADR TRS_Z2))
              (TRS_ISSORT[A34] (CADDR TRS_Z2))
              (NOT (CDDDR TRS_Z2))
              (NOT (EQUAL (CAADDR TRS_Z2) 'TRS_NIL))
              (NOT (EQUAL (CAADDR TRS_Z2) 'TRS_CONS))
              (EQUAL 'TRS_TRUE
                     (CAR (TRS_GE (CADR TRS_Z2)
                                  (CADADR (CDR TRS_Z2))))))
         (EQUAL (TRS_DELPRIME '(TRS_0) TRS_Z2)
                '(TRS_TRUE))).

But simplification reduces this to T, using the :definition TRS_ISSORT[A34].

Subgoal *1/9.2
(IMPLIES (AND (CONSP TRS_Z2)
              (CONSP (CDR TRS_Z2))
              (CONSP (CDDR TRS_Z2))
              (EQUAL 'TRS_CONS (CAR TRS_Z2))
              (TRS_ISSORT[A33] (CADR TRS_Z2))
              (TRS_ISSORT[A34] (CADDR TRS_Z2))
              (NOT (CDDDR TRS_Z2))
              (NOT (EQUAL (CAADDR TRS_Z2) 'TRS_NIL))
              (NOT (EQUAL (CAADDR TRS_Z2) 'TRS_CONS))
              (CDR (TRS_GE (CADR TRS_Z2)
                           (CADADR (CDR TRS_Z2)))))
         (EQUAL (TRS_DELPRIME '(TRS_0) TRS_Z2)
                '(TRS_TRUE))).

But simplification reduces this to T, using the :definition TRS_ISSORT[A34].

Subgoal *1/9.1
(IMPLIES (AND (CONSP TRS_Z2)
              (CONSP (CDR TRS_Z2))
              (CONSP (CDDR TRS_Z2))
              (EQUAL 'TRS_CONS (CAR TRS_Z2))
              (TRS_ISSORT[A33] (CADR TRS_Z2))
              (TRS_ISSORT[A34] (CADDR TRS_Z2))
              (NOT (CDDDR TRS_Z2))
              (NOT (EQUAL (CAADDR TRS_Z2) 'TRS_NIL))
              (NOT (EQUAL (CAADDR TRS_Z2) 'TRS_CONS))
              (NOT (EQUAL 'TRS_FALSE
                          (CAR (TRS_GE (CADR TRS_Z2)
                                       (CADADR (CDR TRS_Z2)))))))
         (EQUAL (TRS_DELPRIME '(TRS_0) TRS_Z2)
                '(TRS_TRUE))).

But simplification reduces this to T, using the :definition TRS_ISSORT[A34].

Subgoal *1/8
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                        (EQ (CAADDR TRS_Z2) 'TRS_NIL)))
              (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                        (EQ (CAADDR TRS_Z2) 'TRS_CONS)
                        (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                    (CADADR (CDR TRS_Z2)))
                                            '(TRS_TRUE))
                            '(TRS_TRUE))))
              (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                          (CADADR (CDR TRS_Z2)))
                                  '(TRS_TRUE))
                  '(TRS_FALSE))
              (EQUAL (TRS_DELPRIME (TRS_MAX (LIST 'TRS_CONS
                                                  (CADADR (CDR TRS_Z2))
                                                  (CADDAR (CDDR TRS_Z2))))
                                   (LIST 'TRS_CONS
                                         (CADADR (CDR TRS_Z2))
                                         (CADDAR (CDDR TRS_Z2))))
                     '(TRS_TRUE))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

By the simple :definition EQ we reduce the conjecture to

Subgoal *1/8'
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQUAL (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQUAL (CAR TRS_Z2) 'TRS_CONS)
                        (EQUAL (CAADDR TRS_Z2) 'TRS_NIL)))
              (NOT (AND (EQUAL (CAR TRS_Z2) 'TRS_CONS)
                        (EQUAL (CAADDR TRS_Z2) 'TRS_CONS)
                        (EQUAL (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                       (CADADR (CDR TRS_Z2)))
                                               '(TRS_TRUE))
                               '(TRS_TRUE))))
              (EQUAL (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                             (CADADR (CDR TRS_Z2)))
                                     '(TRS_TRUE))
                     '(TRS_FALSE))
              (EQUAL (TRS_DELPRIME (TRS_MAX (LIST 'TRS_CONS
                                                  (CADADR (CDR TRS_Z2))
                                                  (CADDAR (CDDR TRS_Z2))))
                                   (LIST 'TRS_CONS
                                         (CADADR (CDR TRS_Z2))
                                         (CADDAR (CDDR TRS_Z2))))
                     '(TRS_TRUE))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

But simplification reduces this to T, using the :definitions TRS_DELPRIME,
TRS_EQUAL_BOOL, TRS_ISBOOL, TRS_ISSORT[A34] and TRS_MAX, the :executable-
counterparts of CAR, EQUAL and TRS_ISBOOL, primitive type reasoning,
the :rewrite rules CAR-CONS and CDR-CONS and the :type-prescription
rules TRS_EQ, TRS_GE, TRS_ISSORT[A33] and TRS_ISSORT[A34].

Subgoal *1/7
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                        (EQ (CAADDR TRS_Z2) 'TRS_NIL)))
              (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                        (EQ (CAADDR TRS_Z2) 'TRS_CONS)
                        (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                    (CADADR (CDR TRS_Z2)))
                                            '(TRS_TRUE))
                            '(TRS_TRUE))))
              (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                          (CADADR (CDR TRS_Z2)))
                                  '(TRS_TRUE))
                  '(TRS_FALSE))
              (EQUAL (LIST 'TRS_CONS
                           (CADADR (CDR TRS_Z2))
                           (CADDAR (CDDR TRS_Z2)))
                     '(TRS_NIL))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

But we reduce the conjecture to T, by the simple :definition EQ and
the simple :rewrite rule CONS-EQUAL.

Subgoal *1/6
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                        (EQ (CAADDR TRS_Z2) 'TRS_NIL)))
              (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                        (EQ (CAADDR TRS_Z2) 'TRS_CONS)
                        (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                    (CADADR (CDR TRS_Z2)))
                                            '(TRS_TRUE))
                            '(TRS_TRUE))))
              (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                          (CADADR (CDR TRS_Z2)))
                                  '(TRS_TRUE))
                  '(TRS_FALSE))
              (NOT (TRS_ISSORT[A34] (LIST 'TRS_CONS
                                          (CADADR (CDR TRS_Z2))
                                          (CADDAR (CDDR TRS_Z2)))))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

By the simple :definition EQ we reduce the conjecture to

Subgoal *1/6'
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQUAL (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQUAL (CAR TRS_Z2) 'TRS_CONS)
                        (EQUAL (CAADDR TRS_Z2) 'TRS_NIL)))
              (NOT (AND (EQUAL (CAR TRS_Z2) 'TRS_CONS)
                        (EQUAL (CAADDR TRS_Z2) 'TRS_CONS)
                        (EQUAL (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                                       (CADADR (CDR TRS_Z2)))
                                               '(TRS_TRUE))
                               '(TRS_TRUE))))
              (EQUAL (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                             (CADADR (CDR TRS_Z2)))
                                     '(TRS_TRUE))
                     '(TRS_FALSE))
              (NOT (TRS_ISSORT[A34] (LIST 'TRS_CONS
                                          (CADADR (CDR TRS_Z2))
                                          (CADDAR (CDDR TRS_Z2)))))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

But simplification reduces this to T, using the :definitions TRS_EQUAL_BOOL,
TRS_ISBOOL and TRS_ISSORT[A34], the :executable-counterparts of CAR,
EQUAL and TRS_ISBOOL, primitive type reasoning, the :rewrite rules
CAR-CONS and CDR-CONS and the :type-prescription rules TRS_GE, 
TRS_ISSORT[A33] and TRS_ISSORT[A34].

Subgoal *1/5
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                        (EQ (CAADDR TRS_Z2) 'TRS_NIL)))
              (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                   (EQ (CAADDR TRS_Z2) 'TRS_CONS)
                   (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                               (CADADR (CDR TRS_Z2)))
                                       '(TRS_TRUE))
                       '(TRS_TRUE)))
              (EQUAL (TRS_DELPRIME (TRS_MAX (LIST 'TRS_CONS
                                                  (CADR TRS_Z2)
                                                  (CADDAR (CDDR TRS_Z2))))
                                   (LIST 'TRS_CONS
                                         (CADR TRS_Z2)
                                         (CADDAR (CDDR TRS_Z2))))
                     '(TRS_TRUE))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

By the simple :definition EQ we reduce the conjecture to

Subgoal *1/5'
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQUAL (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQUAL (CAR TRS_Z2) 'TRS_CONS)
                        (EQUAL (CAADDR TRS_Z2) 'TRS_NIL)))
              (EQUAL (CAR TRS_Z2) 'TRS_CONS)
              (EQUAL (CAADDR TRS_Z2) 'TRS_CONS)
              (EQUAL (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                             (CADADR (CDR TRS_Z2)))
                                     '(TRS_TRUE))
                     '(TRS_TRUE))
              (EQUAL (TRS_DELPRIME (TRS_MAX (LIST 'TRS_CONS
                                                  (CADR TRS_Z2)
                                                  (CADDAR (CDDR TRS_Z2))))
                                   (LIST 'TRS_CONS
                                         (CADR TRS_Z2)
                                         (CADDAR (CDDR TRS_Z2))))
                     '(TRS_TRUE))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

But simplification reduces this to T, using the :definitions TRS_DELPRIME,
TRS_EQUAL_BOOL, TRS_ISBOOL, TRS_ISSORT[A34] and TRS_MAX, the :executable-
counterparts of CAR, EQUAL and TRS_ISBOOL, primitive type reasoning,
the :rewrite rules CAR-CONS and CDR-CONS and the :type-prescription
rules TRS_EQ, TRS_GE, TRS_ISSORT[A33] and TRS_ISSORT[A34].

Subgoal *1/4
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                        (EQ (CAADDR TRS_Z2) 'TRS_NIL)))
              (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                   (EQ (CAADDR TRS_Z2) 'TRS_CONS)
                   (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                               (CADADR (CDR TRS_Z2)))
                                       '(TRS_TRUE))
                       '(TRS_TRUE)))
              (EQUAL (LIST 'TRS_CONS
                           (CADR TRS_Z2)
                           (CADDAR (CDDR TRS_Z2)))
                     '(TRS_NIL))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

But we reduce the conjecture to T, by the simple :definition EQ and
the simple :rewrite rule CONS-EQUAL.

Subgoal *1/3
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                        (EQ (CAADDR TRS_Z2) 'TRS_NIL)))
              (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                   (EQ (CAADDR TRS_Z2) 'TRS_CONS)
                   (EQ (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                               (CADADR (CDR TRS_Z2)))
                                       '(TRS_TRUE))
                       '(TRS_TRUE)))
              (NOT (TRS_ISSORT[A34] (LIST 'TRS_CONS
                                          (CADR TRS_Z2)
                                          (CADDAR (CDDR TRS_Z2)))))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

By the simple :definition EQ we reduce the conjecture to

Subgoal *1/3'
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQUAL (CAR TRS_Z2) 'TRS_NIL))
              (NOT (AND (EQUAL (CAR TRS_Z2) 'TRS_CONS)
                        (EQUAL (CAADDR TRS_Z2) 'TRS_NIL)))
              (EQUAL (CAR TRS_Z2) 'TRS_CONS)
              (EQUAL (CAADDR TRS_Z2) 'TRS_CONS)
              (EQUAL (TRS_EQUAL_BOOL (TRS_GE (CADR TRS_Z2)
                                             (CADADR (CDR TRS_Z2)))
                                     '(TRS_TRUE))
                     '(TRS_TRUE))
              (NOT (TRS_ISSORT[A34] (LIST 'TRS_CONS
                                          (CADR TRS_Z2)
                                          (CADDAR (CDDR TRS_Z2)))))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

But simplification reduces this to T, using the :definitions TRS_EQUAL_BOOL,
TRS_ISBOOL and TRS_ISSORT[A34], the :executable-counterparts of CAR,
EQUAL and TRS_ISBOOL, primitive type reasoning, the :rewrite rules
CAR-CONS and CDR-CONS and the :type-prescription rules TRS_GE, 
TRS_ISSORT[A33] and TRS_ISSORT[A34].

Subgoal *1/2
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQ (CAR TRS_Z2) 'TRS_NIL))
              (AND (EQ (CAR TRS_Z2) 'TRS_CONS)
                   (EQ (CAADDR TRS_Z2) 'TRS_NIL))
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

By the simple :definition EQ we reduce the conjecture to

Subgoal *1/2'
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (NOT (EQUAL (CAR TRS_Z2) 'TRS_NIL))
              (EQUAL (CAR TRS_Z2) 'TRS_CONS)
              (EQUAL (CAADDR TRS_Z2) 'TRS_NIL)
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

This simplifies, using the :definitions TRS_ISSORT[A34] and TRS_MAX,
the :executable-counterparts of CAR and EQUAL, primitive type reasoning
and the :type-prescription rules TRS_ISSORT[A33] and TRS_ISSORT[A34],
to

Subgoal *1/2''
(IMPLIES (AND (CONSP TRS_Z2)
              (CONSP (CDR TRS_Z2))
              (CONSP (CDDR TRS_Z2))
              (TRS_ISSORT[A33] (CADR TRS_Z2))
              (CONSP (CADDR TRS_Z2))
              (NOT (CDADDR TRS_Z2))
              (NOT (CDDDR TRS_Z2))
              (EQUAL (CAR TRS_Z2) 'TRS_CONS)
              (EQUAL (CAADDR TRS_Z2) 'TRS_NIL))
         (EQUAL (TRS_DELPRIME (CADR TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

This simplifies, using the :definitions TRS_DELPRIME, TRS_EQUAL_BOOL,
TRS_ISBOOL and TRS_ISSORT[A34], the :executable-counterparts of CAR,
EQUAL and TRS_ISBOOL, primitive type reasoning and the :type-prescription
rules TRS_EQ, TRS_ISSORT[A33] and TRS_ISSORT[A34], to

Subgoal *1/2'''
(IMPLIES (AND (CONSP TRS_Z2)
              (CONSP (CDR TRS_Z2))
              (CONSP (CDDR TRS_Z2))
              (TRS_ISSORT[A33] (CADR TRS_Z2))
              (CONSP (CADDR TRS_Z2))
              (NOT (CDADDR TRS_Z2))
              (NOT (CDDDR TRS_Z2))
              (EQUAL (CAR TRS_Z2) 'TRS_CONS)
              (EQUAL (CAADDR TRS_Z2) 'TRS_NIL)
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ (CADR TRS_Z2) (CADR TRS_Z2)))))
         (CDR (TRS_EQ (CADR TRS_Z2) (CADR TRS_Z2)))).

The destructor terms (CAR TRS_Z2) and (CDR TRS_Z2) can be eliminated.
Furthermore, those terms are at the root of a chain of four rounds
of destructor elimination. (1) Use CAR-CDR-ELIM to replace TRS_Z2 by
(CONS TRS_Z3 TRS_Z4), (CAR TRS_Z2) by TRS_Z3 and (CDR TRS_Z2) by TRS_Z4
and restrict the type of the new variable TRS_Z3 to be that of the
term it replaces.  (2) Use CAR-CDR-ELIM, again, to replace TRS_Z4 by
(CONS TRS_Z5 TRS_Z6), (CAR TRS_Z4) by TRS_Z5 and (CDR TRS_Z4) by TRS_Z6.
(3) Use CAR-CDR-ELIM to replace TRS_Z6 by (CONS TRS_Z7 TRS_Z8), (CAR TRS_Z6)
by TRS_Z7 and (CDR TRS_Z6) by TRS_Z8.  (4) Finally, use CAR-CDR-ELIM
to replace TRS_Z7 by (CONS TRS_Z9 TRS_Z10), (CAR TRS_Z7) by TRS_Z9
and (CDR TRS_Z7) by TRS_Z10 and restrict the type of the new variable
TRS_Z9 to be that of the term it replaces.    These steps produce the
following goal.

Subgoal *1/2'4'
(IMPLIES (AND (SYMBOLP TRS_Z9)
              (NOT (EQUAL TRS_Z9 T))
              (NOT (EQUAL TRS_Z9 NIL))
              (CONSP (CONS TRS_Z9 TRS_Z10))
              (CONSP (CONS (CONS TRS_Z9 TRS_Z10) TRS_Z8))
              (CONSP (LIST* TRS_Z5 (CONS TRS_Z9 TRS_Z10)
                            TRS_Z8))
              (SYMBOLP TRS_Z3)
              (NOT (EQUAL TRS_Z3 T))
              (NOT (EQUAL TRS_Z3 NIL))
              (CONSP (LIST* TRS_Z3 TRS_Z5 (CONS TRS_Z9 TRS_Z10)
                            TRS_Z8))
              (TRS_ISSORT[A33] TRS_Z5)
              (NOT TRS_Z10)
              (NOT TRS_Z8)
              (EQUAL TRS_Z3 'TRS_CONS)
              (EQUAL TRS_Z9 'TRS_NIL)
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

By case analysis we reduce the conjecture to

Subgoal *1/2'5'
(IMPLIES (AND (SYMBOLP TRS_Z9)
              (NOT (EQUAL TRS_Z9 T))
              TRS_Z9 (CONSP (CONS TRS_Z9 TRS_Z10))
              (CONSP (CONS (CONS TRS_Z9 TRS_Z10) TRS_Z8))
              (CONSP (LIST* TRS_Z5 (CONS TRS_Z9 TRS_Z10)
                            TRS_Z8))
              (SYMBOLP TRS_Z3)
              (NOT (EQUAL TRS_Z3 T))
              TRS_Z3
              (CONSP (LIST* TRS_Z3 TRS_Z5 (CONS TRS_Z9 TRS_Z10)
                            TRS_Z8))
              (TRS_ISSORT[A33] TRS_Z5)
              (NOT TRS_Z10)
              (NOT TRS_Z8)
              (EQUAL TRS_Z3 'TRS_CONS)
              (EQUAL TRS_Z9 'TRS_NIL)
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

This simplifies, using the :executable-counterparts of CONS, CONSP,
EQUAL, NOT and SYMBOLP and primitive type reasoning, to

Subgoal *1/2'6'
(IMPLIES (AND (TRS_ISSORT[A33] TRS_Z5)
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

Name the formula above *1.1.

Subgoal *1/1
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (EQ (CAR TRS_Z2) 'TRS_NIL)
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

By the simple :definition EQ we reduce the conjecture to

Subgoal *1/1'
(IMPLIES (AND (TRS_ISSORT[A34] TRS_Z2)
              (EQUAL (CAR TRS_Z2) 'TRS_NIL)
              (NOT (EQUAL TRS_Z2 '(TRS_NIL))))
         (EQUAL (TRS_DELPRIME (TRS_MAX TRS_Z2) TRS_Z2)
                '(TRS_TRUE))).

But simplification reduces this to T, using the :definition TRS_ISSORT[A34],
the :executable-counterparts of CAR, CDR and EQUAL and primitive type
reasoning.

So we now return to *1.1, which is

(IMPLIES (AND (TRS_ISSORT[A33] TRS_Z5)
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

Perhaps we can prove *1.1 by induction.  Three induction schemes are
suggested by this conjecture.  Subsumption reduces that number to two.
These merge into one derived induction scheme.  

We will induct according to a scheme suggested by (TRS_EQ TRS_Z5 TRS_Z5).
This suggestion was produced using the :induction rules TRS_EQ and
TRS_ISSORT[A33].  If we let (:P TRS_Z5) denote *1.1 above then the
induction scheme we'll use is
(AND (IMPLIES (NOT (AND (TRS_ISSORT[A33] TRS_Z5)
                        (TRS_ISSORT[A33] TRS_Z5)))
              (:P TRS_Z5))
     (IMPLIES (AND (AND (TRS_ISSORT[A33] TRS_Z5)
                        (TRS_ISSORT[A33] TRS_Z5))
                   (NOT (AND (EQ (CAR TRS_Z5) 'TRS_0)
                             (EQ (CAR TRS_Z5) 'TRS_0)))
                   (NOT (AND (EQ (CAR TRS_Z5) 'TRS_0)
                             (EQ (CAR TRS_Z5) 'TRS_S)))
                   (NOT (AND (EQ (CAR TRS_Z5) 'TRS_S)
                             (EQ (CAR TRS_Z5) 'TRS_0)))
                   T (:P (CADR TRS_Z5)))
              (:P TRS_Z5))
     (IMPLIES (AND (AND (TRS_ISSORT[A33] TRS_Z5)
                        (TRS_ISSORT[A33] TRS_Z5))
                   (NOT (AND (EQ (CAR TRS_Z5) 'TRS_0)
                             (EQ (CAR TRS_Z5) 'TRS_0)))
                   (NOT (AND (EQ (CAR TRS_Z5) 'TRS_0)
                             (EQ (CAR TRS_Z5) 'TRS_S)))
                   (AND (EQ (CAR TRS_Z5) 'TRS_S)
                        (EQ (CAR TRS_Z5) 'TRS_0)))
              (:P TRS_Z5))
     (IMPLIES (AND (AND (TRS_ISSORT[A33] TRS_Z5)
                        (TRS_ISSORT[A33] TRS_Z5))
                   (NOT (AND (EQ (CAR TRS_Z5) 'TRS_0)
                             (EQ (CAR TRS_Z5) 'TRS_0)))
                   (AND (EQ (CAR TRS_Z5) 'TRS_0)
                        (EQ (CAR TRS_Z5) 'TRS_S)))
              (:P TRS_Z5))
     (IMPLIES (AND (AND (TRS_ISSORT[A33] TRS_Z5)
                        (TRS_ISSORT[A33] TRS_Z5))
                   (AND (EQ (CAR TRS_Z5) 'TRS_0)
                        (EQ (CAR TRS_Z5) 'TRS_0)))
              (:P TRS_Z5))).
This induction is justified by the same argument used to admit TRS_EQ.
When applied to the goal at hand the above induction scheme produces
four nontautological subgoals.

Subgoal *1.1/4
(IMPLIES (AND (AND (TRS_ISSORT[A33] TRS_Z5)
                   (TRS_ISSORT[A33] TRS_Z5))
              (NOT (AND (EQ (CAR TRS_Z5) 'TRS_0)
                        (EQ (CAR TRS_Z5) 'TRS_0)))
              (NOT (AND (EQ (CAR TRS_Z5) 'TRS_0)
                        (EQ (CAR TRS_Z5) 'TRS_S)))
              (NOT (AND (EQ (CAR TRS_Z5) 'TRS_S)
                        (EQ (CAR TRS_Z5) 'TRS_0)))
              T
              (CDR (TRS_EQ (CADR TRS_Z5) (CADR TRS_Z5)))
              (TRS_ISSORT[A33] TRS_Z5)
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

By the simple :definition EQ we reduce the conjecture to

Subgoal *1.1/4'
(IMPLIES (AND (TRS_ISSORT[A33] TRS_Z5)
              (NOT (AND (EQUAL (CAR TRS_Z5) 'TRS_0)
                        (EQUAL (CAR TRS_Z5) 'TRS_0)))
              (NOT (AND (EQUAL (CAR TRS_Z5) 'TRS_0)
                        (EQUAL (CAR TRS_Z5) 'TRS_S)))
              (NOT (AND (EQUAL (CAR TRS_Z5) 'TRS_S)
                        (EQUAL (CAR TRS_Z5) 'TRS_0)))
              (CDR (TRS_EQ (CADR TRS_Z5) (CADR TRS_Z5)))
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

But simplification reduces this to T, using the :definitions TRS_EQ
and TRS_ISSORT[A33], the :executable-counterpart of EQUAL, primitive
type reasoning and the :type-prescription rules TRS_EQ and TRS_ISSORT[A33].

Subgoal *1.1/3
(IMPLIES (AND (AND (TRS_ISSORT[A33] TRS_Z5)
                   (TRS_ISSORT[A33] TRS_Z5))
              (NOT (AND (EQ (CAR TRS_Z5) 'TRS_0)
                        (EQ (CAR TRS_Z5) 'TRS_0)))
              (NOT (AND (EQ (CAR TRS_Z5) 'TRS_0)
                        (EQ (CAR TRS_Z5) 'TRS_S)))
              (NOT (AND (EQ (CAR TRS_Z5) 'TRS_S)
                        (EQ (CAR TRS_Z5) 'TRS_0)))
              T
              (NOT (EQUAL 'TRS_FALSE
                          (CAR (TRS_EQ (CADR TRS_Z5) (CADR TRS_Z5)))))
              (TRS_ISSORT[A33] TRS_Z5)
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

By the simple :definition EQ we reduce the conjecture to

Subgoal *1.1/3'
(IMPLIES (AND (TRS_ISSORT[A33] TRS_Z5)
              (NOT (AND (EQUAL (CAR TRS_Z5) 'TRS_0)
                        (EQUAL (CAR TRS_Z5) 'TRS_0)))
              (NOT (AND (EQUAL (CAR TRS_Z5) 'TRS_0)
                        (EQUAL (CAR TRS_Z5) 'TRS_S)))
              (NOT (AND (EQUAL (CAR TRS_Z5) 'TRS_S)
                        (EQUAL (CAR TRS_Z5) 'TRS_0)))
              (NOT (EQUAL 'TRS_FALSE
                          (CAR (TRS_EQ (CADR TRS_Z5) (CADR TRS_Z5)))))
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

But simplification reduces this to T, using the :definitions TRS_EQ
and TRS_ISSORT[A33], the :executable-counterpart of EQUAL, primitive
type reasoning and the :type-prescription rule TRS_ISSORT[A33].

Subgoal *1.1/2
(IMPLIES (AND (AND (TRS_ISSORT[A33] TRS_Z5)
                   (TRS_ISSORT[A33] TRS_Z5))
              (NOT (AND (EQ (CAR TRS_Z5) 'TRS_0)
                        (EQ (CAR TRS_Z5) 'TRS_0)))
              (NOT (AND (EQ (CAR TRS_Z5) 'TRS_0)
                        (EQ (CAR TRS_Z5) 'TRS_S)))
              (NOT (AND (EQ (CAR TRS_Z5) 'TRS_S)
                        (EQ (CAR TRS_Z5) 'TRS_0)))
              T (NOT (TRS_ISSORT[A33] (CADR TRS_Z5)))
              (TRS_ISSORT[A33] TRS_Z5)
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

By the simple :definition EQ we reduce the conjecture to

Subgoal *1.1/2'
(IMPLIES (AND (TRS_ISSORT[A33] TRS_Z5)
              (NOT (AND (EQUAL (CAR TRS_Z5) 'TRS_0)
                        (EQUAL (CAR TRS_Z5) 'TRS_0)))
              (NOT (AND (EQUAL (CAR TRS_Z5) 'TRS_0)
                        (EQUAL (CAR TRS_Z5) 'TRS_S)))
              (NOT (AND (EQUAL (CAR TRS_Z5) 'TRS_S)
                        (EQUAL (CAR TRS_Z5) 'TRS_0)))
              (NOT (TRS_ISSORT[A33] (CADR TRS_Z5)))
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

But simplification reduces this to T, using the :definition TRS_ISSORT[A33]
and primitive type reasoning.

Subgoal *1.1/1
(IMPLIES (AND (AND (TRS_ISSORT[A33] TRS_Z5)
                   (TRS_ISSORT[A33] TRS_Z5))
              (AND (EQ (CAR TRS_Z5) 'TRS_0)
                   (EQ (CAR TRS_Z5) 'TRS_0))
              (TRS_ISSORT[A33] TRS_Z5)
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

By the simple :definition EQ we reduce the conjecture to

Subgoal *1.1/1'
(IMPLIES (AND (TRS_ISSORT[A33] TRS_Z5)
              (EQUAL (CAR TRS_Z5) 'TRS_0)
              (EQUAL 'TRS_FALSE
                     (CAR (TRS_EQ TRS_Z5 TRS_Z5))))
         (CDR (TRS_EQ TRS_Z5 TRS_Z5))).

But simplification reduces this to T, using the :definitions TRS_EQ
and TRS_ISSORT[A33], the :executable-counterparts of CAR and EQUAL
and primitive type reasoning.

That completes the proofs of *1.1 and *1.

Q.E.D.

Summary
Form:  ( DEFTHM TEST ...)
Rules: ((:DEFINITION EQ)
        (:DEFINITION NOT)
        (:DEFINITION TRS_DELPRIME)
        (:DEFINITION TRS_EQ)
        (:DEFINITION TRS_EQUAL_BOOL)
        (:DEFINITION TRS_ISBOOL)
        (:DEFINITION TRS_ISSORT[A33])
        (:DEFINITION TRS_ISSORT[A34])
        (:DEFINITION TRS_MAX)
        (:ELIM CAR-CDR-ELIM)
        (:EXECUTABLE-COUNTERPART CAR)
        (:EXECUTABLE-COUNTERPART CDR)
        (:EXECUTABLE-COUNTERPART CONS)
        (:EXECUTABLE-COUNTERPART CONSP)
        (:EXECUTABLE-COUNTERPART EQUAL)
        (:EXECUTABLE-COUNTERPART NOT)
        (:EXECUTABLE-COUNTERPART SYMBOLP)
        (:EXECUTABLE-COUNTERPART TRS_ISBOOL)
        (:FAKE-RUNE-FOR-TYPE-SET NIL)
        (:INDUCTION TRS_EQ)
        (:INDUCTION TRS_ISSORT[A33])
        (:INDUCTION TRS_MAX)
        (:REWRITE CAR-CONS)
        (:REWRITE CDR-CONS)
        (:REWRITE CONS-EQUAL)
        (:TYPE-PRESCRIPTION TRS_EQ)
        (:TYPE-PRESCRIPTION TRS_GE)
        (:TYPE-PRESCRIPTION TRS_ISSORT[A33])
        (:TYPE-PRESCRIPTION TRS_ISSORT[A34]))
Warnings:  None
Time:  0.37 seconds (prove: 0.36, print: 0.01, other: 0.00)
 TEST
ACL2 !>Bye.

(53) Complex Obligation (AND)

(54) Obligation:

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

SORT(cons(x0, x1)) → IF3(false, cons(x0, x1))

The TRS R consists of the following rules:

max(nil) → 0
max(cons(x, nil)) → x
max(cons(x, cons(y, xs))) → if1(ge(x, y), x, y, xs)
if1(true, x, y, xs) → max(cons(x, xs))
if1(false, x, y, xs) → max(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if2(eq(x, y), x, y, xs)
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
if2(true, x, y, xs) → xs
if2(false, x, y, xs) → cons(y, del(x, xs))
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)

The set Q consists of the following terms:

max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(55) DependencyGraphProof (EQUIVALENT transformation)

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

(56) TRUE

(57) Obligation:

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

del'(x67, nil) → false
del'(x81, cons(y55, xs37)) → if2'(eq(x81, y55), x81, y55, xs37)
if2'(true, x149, y103, xs68) → true
if2'(false, x163, y113, xs75) → del'(x163, xs75)
max(nil) → 0
max(cons(x11, nil)) → x11
max(cons(x25, cons(y16, xs10))) → if1(ge(x25, y16), x25, y16, xs10)
if1(true, x39, y26, xs17) → max(cons(x39, xs17))
if1(false, x53, y36, xs24) → max(cons(y36, xs24))
del(x67, nil) → nil
del(x81, cons(y55, xs37)) → if2(eq(x81, y55), x81, y55, xs37)
eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)
if2(true, x149, y103, xs68) → xs68
if2(false, x163, y113, xs75) → cons(y113, del(x163, xs75))
ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a33](0, 0) → true
equal_sort[a33](0, s(x0)) → false
equal_sort[a33](s(x0), 0) → false
equal_sort[a33](s(x0), s(x1)) → equal_sort[a33](x0, x1)
equal_sort[a34](nil, nil) → true
equal_sort[a34](nil, cons(x0, x1)) → false
equal_sort[a34](cons(x0, x1), nil) → false
equal_sort[a34](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63]) → true

Q is empty.

(58) Overlay + Local Confluence (EQUIVALENT transformation)

The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.

(59) Obligation:

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

del'(x67, nil) → false
del'(x81, cons(y55, xs37)) → if2'(eq(x81, y55), x81, y55, xs37)
if2'(true, x149, y103, xs68) → true
if2'(false, x163, y113, xs75) → del'(x163, xs75)
max(nil) → 0
max(cons(x11, nil)) → x11
max(cons(x25, cons(y16, xs10))) → if1(ge(x25, y16), x25, y16, xs10)
if1(true, x39, y26, xs17) → max(cons(x39, xs17))
if1(false, x53, y36, xs24) → max(cons(y36, xs24))
del(x67, nil) → nil
del(x81, cons(y55, xs37)) → if2(eq(x81, y55), x81, y55, xs37)
eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)
if2(true, x149, y103, xs68) → xs68
if2(false, x163, y113, xs75) → cons(y113, del(x163, xs75))
ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a33](0, 0) → true
equal_sort[a33](0, s(x0)) → false
equal_sort[a33](s(x0), 0) → false
equal_sort[a33](s(x0), s(x1)) → equal_sort[a33](x0, x1)
equal_sort[a34](nil, nil) → true
equal_sort[a34](nil, cons(x0, x1)) → false
equal_sort[a34](cons(x0, x1), nil) → false
equal_sort[a34](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63]) → true

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

(60) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(61) Obligation:

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

DEL'(x81, cons(y55, xs37)) → IF2'(eq(x81, y55), x81, y55, xs37)
DEL'(x81, cons(y55, xs37)) → EQ(x81, y55)
IF2'(false, x163, y113, xs75) → DEL'(x163, xs75)
MAX(cons(x25, cons(y16, xs10))) → IF1(ge(x25, y16), x25, y16, xs10)
MAX(cons(x25, cons(y16, xs10))) → GE(x25, y16)
IF1(true, x39, y26, xs17) → MAX(cons(x39, xs17))
IF1(false, x53, y36, xs24) → MAX(cons(y36, xs24))
DEL(x81, cons(y55, xs37)) → IF2(eq(x81, y55), x81, y55, xs37)
DEL(x81, cons(y55, xs37)) → EQ(x81, y55)
EQ(s(x135), s(y93)) → EQ(x135, y93)
IF2(false, x163, y113, xs75) → DEL(x163, xs75)
GE(s(x205), s(y141)) → GE(x205, y141)
EQUAL_SORT[A33](s(x0), s(x1)) → EQUAL_SORT[A33](x0, x1)
EQUAL_SORT[A34](cons(x0, x1), cons(x2, x3)) → AND(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
EQUAL_SORT[A34](cons(x0, x1), cons(x2, x3)) → EQUAL_SORT[A34](x0, x2)
EQUAL_SORT[A34](cons(x0, x1), cons(x2, x3)) → EQUAL_SORT[A34](x1, x3)

The TRS R consists of the following rules:

del'(x67, nil) → false
del'(x81, cons(y55, xs37)) → if2'(eq(x81, y55), x81, y55, xs37)
if2'(true, x149, y103, xs68) → true
if2'(false, x163, y113, xs75) → del'(x163, xs75)
max(nil) → 0
max(cons(x11, nil)) → x11
max(cons(x25, cons(y16, xs10))) → if1(ge(x25, y16), x25, y16, xs10)
if1(true, x39, y26, xs17) → max(cons(x39, xs17))
if1(false, x53, y36, xs24) → max(cons(y36, xs24))
del(x67, nil) → nil
del(x81, cons(y55, xs37)) → if2(eq(x81, y55), x81, y55, xs37)
eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)
if2(true, x149, y103, xs68) → xs68
if2(false, x163, y113, xs75) → cons(y113, del(x163, xs75))
ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a33](0, 0) → true
equal_sort[a33](0, s(x0)) → false
equal_sort[a33](s(x0), 0) → false
equal_sort[a33](s(x0), s(x1)) → equal_sort[a33](x0, x1)
equal_sort[a34](nil, nil) → true
equal_sort[a34](nil, cons(x0, x1)) → false
equal_sort[a34](cons(x0, x1), nil) → false
equal_sort[a34](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63]) → true

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

(62) DependencyGraphProof (EQUIVALENT transformation)

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

(63) Complex Obligation (AND)

(64) Obligation:

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

EQUAL_SORT[A34](cons(x0, x1), cons(x2, x3)) → EQUAL_SORT[A34](x1, x3)
EQUAL_SORT[A34](cons(x0, x1), cons(x2, x3)) → EQUAL_SORT[A34](x0, x2)

The TRS R consists of the following rules:

del'(x67, nil) → false
del'(x81, cons(y55, xs37)) → if2'(eq(x81, y55), x81, y55, xs37)
if2'(true, x149, y103, xs68) → true
if2'(false, x163, y113, xs75) → del'(x163, xs75)
max(nil) → 0
max(cons(x11, nil)) → x11
max(cons(x25, cons(y16, xs10))) → if1(ge(x25, y16), x25, y16, xs10)
if1(true, x39, y26, xs17) → max(cons(x39, xs17))
if1(false, x53, y36, xs24) → max(cons(y36, xs24))
del(x67, nil) → nil
del(x81, cons(y55, xs37)) → if2(eq(x81, y55), x81, y55, xs37)
eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)
if2(true, x149, y103, xs68) → xs68
if2(false, x163, y113, xs75) → cons(y113, del(x163, xs75))
ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a33](0, 0) → true
equal_sort[a33](0, s(x0)) → false
equal_sort[a33](s(x0), 0) → false
equal_sort[a33](s(x0), s(x1)) → equal_sort[a33](x0, x1)
equal_sort[a34](nil, nil) → true
equal_sort[a34](nil, cons(x0, x1)) → false
equal_sort[a34](cons(x0, x1), nil) → false
equal_sort[a34](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63]) → true

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

(66) Obligation:

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

EQUAL_SORT[A34](cons(x0, x1), cons(x2, x3)) → EQUAL_SORT[A34](x1, x3)
EQUAL_SORT[A34](cons(x0, x1), cons(x2, x3)) → EQUAL_SORT[A34](x0, x2)

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

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

(68) Obligation:

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

EQUAL_SORT[A34](cons(x0, x1), cons(x2, x3)) → EQUAL_SORT[A34](x1, x3)
EQUAL_SORT[A34](cons(x0, x1), cons(x2, x3)) → EQUAL_SORT[A34](x0, x2)

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

(69) 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_SORT[A34](cons(x0, x1), cons(x2, x3)) → EQUAL_SORT[A34](x1, x3)
    The graph contains the following edges 1 > 1, 2 > 2

  • EQUAL_SORT[A34](cons(x0, x1), cons(x2, x3)) → EQUAL_SORT[A34](x0, x2)
    The graph contains the following edges 1 > 1, 2 > 2

(70) YES

(71) Obligation:

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

EQUAL_SORT[A33](s(x0), s(x1)) → EQUAL_SORT[A33](x0, x1)

The TRS R consists of the following rules:

del'(x67, nil) → false
del'(x81, cons(y55, xs37)) → if2'(eq(x81, y55), x81, y55, xs37)
if2'(true, x149, y103, xs68) → true
if2'(false, x163, y113, xs75) → del'(x163, xs75)
max(nil) → 0
max(cons(x11, nil)) → x11
max(cons(x25, cons(y16, xs10))) → if1(ge(x25, y16), x25, y16, xs10)
if1(true, x39, y26, xs17) → max(cons(x39, xs17))
if1(false, x53, y36, xs24) → max(cons(y36, xs24))
del(x67, nil) → nil
del(x81, cons(y55, xs37)) → if2(eq(x81, y55), x81, y55, xs37)
eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)
if2(true, x149, y103, xs68) → xs68
if2(false, x163, y113, xs75) → cons(y113, del(x163, xs75))
ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a33](0, 0) → true
equal_sort[a33](0, s(x0)) → false
equal_sort[a33](s(x0), 0) → false
equal_sort[a33](s(x0), s(x1)) → equal_sort[a33](x0, x1)
equal_sort[a34](nil, nil) → true
equal_sort[a34](nil, cons(x0, x1)) → false
equal_sort[a34](cons(x0, x1), nil) → false
equal_sort[a34](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63]) → true

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

(73) Obligation:

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

EQUAL_SORT[A33](s(x0), s(x1)) → EQUAL_SORT[A33](x0, x1)

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

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

(75) Obligation:

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

EQUAL_SORT[A33](s(x0), s(x1)) → EQUAL_SORT[A33](x0, x1)

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

(76) 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_SORT[A33](s(x0), s(x1)) → EQUAL_SORT[A33](x0, x1)
    The graph contains the following edges 1 > 1, 2 > 2

(77) YES

(78) Obligation:

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

GE(s(x205), s(y141)) → GE(x205, y141)

The TRS R consists of the following rules:

del'(x67, nil) → false
del'(x81, cons(y55, xs37)) → if2'(eq(x81, y55), x81, y55, xs37)
if2'(true, x149, y103, xs68) → true
if2'(false, x163, y113, xs75) → del'(x163, xs75)
max(nil) → 0
max(cons(x11, nil)) → x11
max(cons(x25, cons(y16, xs10))) → if1(ge(x25, y16), x25, y16, xs10)
if1(true, x39, y26, xs17) → max(cons(x39, xs17))
if1(false, x53, y36, xs24) → max(cons(y36, xs24))
del(x67, nil) → nil
del(x81, cons(y55, xs37)) → if2(eq(x81, y55), x81, y55, xs37)
eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)
if2(true, x149, y103, xs68) → xs68
if2(false, x163, y113, xs75) → cons(y113, del(x163, xs75))
ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a33](0, 0) → true
equal_sort[a33](0, s(x0)) → false
equal_sort[a33](s(x0), 0) → false
equal_sort[a33](s(x0), s(x1)) → equal_sort[a33](x0, x1)
equal_sort[a34](nil, nil) → true
equal_sort[a34](nil, cons(x0, x1)) → false
equal_sort[a34](cons(x0, x1), nil) → false
equal_sort[a34](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63]) → true

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

(80) Obligation:

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

GE(s(x205), s(y141)) → GE(x205, y141)

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

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

(82) Obligation:

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

GE(s(x205), s(y141)) → GE(x205, y141)

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

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

  • GE(s(x205), s(y141)) → GE(x205, y141)
    The graph contains the following edges 1 > 1, 2 > 2

(84) YES

(85) Obligation:

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

EQ(s(x135), s(y93)) → EQ(x135, y93)

The TRS R consists of the following rules:

del'(x67, nil) → false
del'(x81, cons(y55, xs37)) → if2'(eq(x81, y55), x81, y55, xs37)
if2'(true, x149, y103, xs68) → true
if2'(false, x163, y113, xs75) → del'(x163, xs75)
max(nil) → 0
max(cons(x11, nil)) → x11
max(cons(x25, cons(y16, xs10))) → if1(ge(x25, y16), x25, y16, xs10)
if1(true, x39, y26, xs17) → max(cons(x39, xs17))
if1(false, x53, y36, xs24) → max(cons(y36, xs24))
del(x67, nil) → nil
del(x81, cons(y55, xs37)) → if2(eq(x81, y55), x81, y55, xs37)
eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)
if2(true, x149, y103, xs68) → xs68
if2(false, x163, y113, xs75) → cons(y113, del(x163, xs75))
ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a33](0, 0) → true
equal_sort[a33](0, s(x0)) → false
equal_sort[a33](s(x0), 0) → false
equal_sort[a33](s(x0), s(x1)) → equal_sort[a33](x0, x1)
equal_sort[a34](nil, nil) → true
equal_sort[a34](nil, cons(x0, x1)) → false
equal_sort[a34](cons(x0, x1), nil) → false
equal_sort[a34](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63]) → true

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

(87) Obligation:

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

EQ(s(x135), s(y93)) → EQ(x135, y93)

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

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

(89) Obligation:

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

EQ(s(x135), s(y93)) → EQ(x135, y93)

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

(90) 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(x135), s(y93)) → EQ(x135, y93)
    The graph contains the following edges 1 > 1, 2 > 2

(91) YES

(92) Obligation:

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

IF2(false, x163, y113, xs75) → DEL(x163, xs75)
DEL(x81, cons(y55, xs37)) → IF2(eq(x81, y55), x81, y55, xs37)

The TRS R consists of the following rules:

del'(x67, nil) → false
del'(x81, cons(y55, xs37)) → if2'(eq(x81, y55), x81, y55, xs37)
if2'(true, x149, y103, xs68) → true
if2'(false, x163, y113, xs75) → del'(x163, xs75)
max(nil) → 0
max(cons(x11, nil)) → x11
max(cons(x25, cons(y16, xs10))) → if1(ge(x25, y16), x25, y16, xs10)
if1(true, x39, y26, xs17) → max(cons(x39, xs17))
if1(false, x53, y36, xs24) → max(cons(y36, xs24))
del(x67, nil) → nil
del(x81, cons(y55, xs37)) → if2(eq(x81, y55), x81, y55, xs37)
eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)
if2(true, x149, y103, xs68) → xs68
if2(false, x163, y113, xs75) → cons(y113, del(x163, xs75))
ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a33](0, 0) → true
equal_sort[a33](0, s(x0)) → false
equal_sort[a33](s(x0), 0) → false
equal_sort[a33](s(x0), s(x1)) → equal_sort[a33](x0, x1)
equal_sort[a34](nil, nil) → true
equal_sort[a34](nil, cons(x0, x1)) → false
equal_sort[a34](cons(x0, x1), nil) → false
equal_sort[a34](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63]) → true

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

(94) Obligation:

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

IF2(false, x163, y113, xs75) → DEL(x163, xs75)
DEL(x81, cons(y55, xs37)) → IF2(eq(x81, y55), x81, y55, xs37)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

(96) Obligation:

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

IF2(false, x163, y113, xs75) → DEL(x163, xs75)
DEL(x81, cons(y55, xs37)) → IF2(eq(x81, y55), x81, y55, xs37)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)

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.

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

  • DEL(x81, cons(y55, xs37)) → IF2(eq(x81, y55), x81, y55, xs37)
    The graph contains the following edges 1 >= 2, 2 > 3, 2 > 4

  • IF2(false, x163, y113, xs75) → DEL(x163, xs75)
    The graph contains the following edges 2 >= 1, 4 >= 2

(98) YES

(99) Obligation:

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

IF1(true, x39, y26, xs17) → MAX(cons(x39, xs17))
MAX(cons(x25, cons(y16, xs10))) → IF1(ge(x25, y16), x25, y16, xs10)
IF1(false, x53, y36, xs24) → MAX(cons(y36, xs24))

The TRS R consists of the following rules:

del'(x67, nil) → false
del'(x81, cons(y55, xs37)) → if2'(eq(x81, y55), x81, y55, xs37)
if2'(true, x149, y103, xs68) → true
if2'(false, x163, y113, xs75) → del'(x163, xs75)
max(nil) → 0
max(cons(x11, nil)) → x11
max(cons(x25, cons(y16, xs10))) → if1(ge(x25, y16), x25, y16, xs10)
if1(true, x39, y26, xs17) → max(cons(x39, xs17))
if1(false, x53, y36, xs24) → max(cons(y36, xs24))
del(x67, nil) → nil
del(x81, cons(y55, xs37)) → if2(eq(x81, y55), x81, y55, xs37)
eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)
if2(true, x149, y103, xs68) → xs68
if2(false, x163, y113, xs75) → cons(y113, del(x163, xs75))
ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a33](0, 0) → true
equal_sort[a33](0, s(x0)) → false
equal_sort[a33](s(x0), 0) → false
equal_sort[a33](s(x0), s(x1)) → equal_sort[a33](x0, x1)
equal_sort[a34](nil, nil) → true
equal_sort[a34](nil, cons(x0, x1)) → false
equal_sort[a34](cons(x0, x1), nil) → false
equal_sort[a34](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63]) → true

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

(101) Obligation:

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

IF1(true, x39, y26, xs17) → MAX(cons(x39, xs17))
MAX(cons(x25, cons(y16, xs10))) → IF1(ge(x25, y16), x25, y16, xs10)
IF1(false, x53, y36, xs24) → MAX(cons(y36, xs24))

The TRS R consists of the following rules:

ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

(103) Obligation:

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

IF1(true, x39, y26, xs17) → MAX(cons(x39, xs17))
MAX(cons(x25, cons(y16, xs10))) → IF1(ge(x25, y16), x25, y16, xs10)
IF1(false, x53, y36, xs24) → MAX(cons(y36, xs24))

The TRS R consists of the following rules:

ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)

The set Q consists of the following terms:

ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(104) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MAX(cons(x25, cons(y16, xs10))) → IF1(ge(x25, y16), x25, y16, xs10)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(IF1(x1, x2, x3, x4)) = 1 + x4   
POL(MAX(x1)) = x1   
POL(cons(x1, x2)) = 1 + x2   
POL(false) = 0   
POL(ge(x1, x2)) = 0   
POL(s(x1)) = 0   
POL(true) = 0   

The following usable rules [FROCOS05] were oriented: none

(105) Obligation:

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

IF1(true, x39, y26, xs17) → MAX(cons(x39, xs17))
IF1(false, x53, y36, xs24) → MAX(cons(y36, xs24))

The TRS R consists of the following rules:

ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)

The set Q consists of the following terms:

ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))

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

(106) DependencyGraphProof (EQUIVALENT transformation)

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

(107) TRUE

(108) Obligation:

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

IF2'(false, x163, y113, xs75) → DEL'(x163, xs75)
DEL'(x81, cons(y55, xs37)) → IF2'(eq(x81, y55), x81, y55, xs37)

The TRS R consists of the following rules:

del'(x67, nil) → false
del'(x81, cons(y55, xs37)) → if2'(eq(x81, y55), x81, y55, xs37)
if2'(true, x149, y103, xs68) → true
if2'(false, x163, y113, xs75) → del'(x163, xs75)
max(nil) → 0
max(cons(x11, nil)) → x11
max(cons(x25, cons(y16, xs10))) → if1(ge(x25, y16), x25, y16, xs10)
if1(true, x39, y26, xs17) → max(cons(x39, xs17))
if1(false, x53, y36, xs24) → max(cons(y36, xs24))
del(x67, nil) → nil
del(x81, cons(y55, xs37)) → if2(eq(x81, y55), x81, y55, xs37)
eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)
if2(true, x149, y103, xs68) → xs68
if2(false, x163, y113, xs75) → cons(y113, del(x163, xs75))
ge(x177, 0) → true
ge(0, s(x191)) → false
ge(s(x205), s(y141)) → ge(x205, y141)
equal_bool(true, false) → false
equal_bool(false, true) → false
equal_bool(true, true) → true
equal_bool(false, false) → true
and(true, x) → x
and(false, x) → false
or(true, x) → true
or(false, x) → x
not(false) → true
not(true) → false
isa_true(true) → true
isa_true(false) → false
isa_false(true) → false
isa_false(false) → true
equal_sort[a33](0, 0) → true
equal_sort[a33](0, s(x0)) → false
equal_sort[a33](s(x0), 0) → false
equal_sort[a33](s(x0), s(x1)) → equal_sort[a33](x0, x1)
equal_sort[a34](nil, nil) → true
equal_sort[a34](nil, cons(x0, x1)) → false
equal_sort[a34](cons(x0, x1), nil) → false
equal_sort[a34](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a34](x0, x2), equal_sort[a34](x1, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63]) → true

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

(110) Obligation:

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

IF2'(false, x163, y113, xs75) → DEL'(x163, xs75)
DEL'(x81, cons(y55, xs37)) → IF2'(eq(x81, y55), x81, y55, xs37)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)

The set Q consists of the following terms:

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

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

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

del'(x0, nil)
del'(x0, cons(x1, x2))
if2'(true, x0, x1, x2)
if2'(false, x0, x1, x2)
max(nil)
max(cons(x0, nil))
max(cons(x0, cons(x1, x2)))
if1(true, x0, x1, x2)
if1(false, x0, x1, x2)
del(x0, nil)
del(x0, cons(x1, x2))
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)
ge(x0, 0)
ge(0, s(x0))
ge(s(x0), s(x1))
equal_bool(true, false)
equal_bool(false, true)
equal_bool(true, true)
equal_bool(false, false)
and(true, x0)
and(false, x0)
or(true, x0)
or(false, x0)
not(false)
not(true)
isa_true(true)
isa_true(false)
isa_false(true)
isa_false(false)
equal_sort[a33](0, 0)
equal_sort[a33](0, s(x0))
equal_sort[a33](s(x0), 0)
equal_sort[a33](s(x0), s(x1))
equal_sort[a34](nil, nil)
equal_sort[a34](nil, cons(x0, x1))
equal_sort[a34](cons(x0, x1), nil)
equal_sort[a34](cons(x0, x1), cons(x2, x3))
equal_sort[a63](witness_sort[a63], witness_sort[a63])

(112) Obligation:

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

IF2'(false, x163, y113, xs75) → DEL'(x163, xs75)
DEL'(x81, cons(y55, xs37)) → IF2'(eq(x81, y55), x81, y55, xs37)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(y74)) → false
eq(s(x121), 0) → false
eq(s(x135), s(y93)) → eq(x135, y93)

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.

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

  • DEL'(x81, cons(y55, xs37)) → IF2'(eq(x81, y55), x81, y55, xs37)
    The graph contains the following edges 1 >= 2, 2 > 3, 2 > 4

  • IF2'(false, x163, y113, xs75) → DEL'(x163, xs75)
    The graph contains the following edges 2 >= 1, 4 >= 2

(114) YES