(0) Obligation:

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

last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(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)
reverse(nil) → nil
reverse(cons(x, xs)) → cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs))))

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:

last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(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)
reverse(nil) → nil
reverse(cons(x, xs)) → cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

(3) DependencyPairsProof (EQUIVALENT transformation)

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

(4) Obligation:

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

LAST(cons(x, cons(y, xs))) → LAST(cons(y, xs))
DEL(x, cons(y, xs)) → IF(eq(x, y), x, y, xs)
DEL(x, cons(y, xs)) → EQ(x, y)
IF(false, x, y, xs) → DEL(x, xs)
EQ(s(x), s(y)) → EQ(x, y)
REVERSE(cons(x, xs)) → LAST(cons(x, xs))
REVERSE(cons(x, xs)) → REVERSE(del(last(cons(x, xs)), cons(x, xs)))
REVERSE(cons(x, xs)) → DEL(last(cons(x, xs)), cons(x, xs))

The TRS R consists of the following rules:

last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(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)
reverse(nil) → nil
reverse(cons(x, xs)) → cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

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

last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(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)
reverse(nil) → nil
reverse(cons(x, xs)) → cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

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

(8) UsableRulesProof (EQUIVALENT transformation)

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

(9) Obligation:

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

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

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

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

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

(10) QReductionProof (EQUIVALENT transformation)

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

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

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

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

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

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

The TRS R consists of the following rules:

last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(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)
reverse(nil) → nil
reverse(cons(x, xs)) → cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

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

(15) UsableRulesProof (EQUIVALENT transformation)

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

(16) Obligation:

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

IF(false, x, y, xs) → DEL(x, xs)
DEL(x, cons(y, xs)) → IF(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:

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

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

(17) QReductionProof (EQUIVALENT transformation)

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

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
reverse(nil)
reverse(cons(x0, x1))

(18) Obligation:

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

IF(false, x, y, xs) → DEL(x, xs)
DEL(x, cons(y, xs)) → IF(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.

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

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

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

(20) YES

(21) Obligation:

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

LAST(cons(x, cons(y, xs))) → LAST(cons(y, xs))

The TRS R consists of the following rules:

last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(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)
reverse(nil) → nil
reverse(cons(x, xs)) → cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

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

(22) UsableRulesProof (EQUIVALENT transformation)

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

(23) Obligation:

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

LAST(cons(x, cons(y, xs))) → LAST(cons(y, xs))

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

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

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

(24) QReductionProof (EQUIVALENT transformation)

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

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

(25) Obligation:

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

LAST(cons(x, cons(y, xs))) → LAST(cons(y, xs))

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

(26) QDPSizeChangeProof (EQUIVALENT transformation)

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

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

  • LAST(cons(x, cons(y, xs))) → LAST(cons(y, xs))
    The graph contains the following edges 1 > 1

(27) YES

(28) Obligation:

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

REVERSE(cons(x, xs)) → REVERSE(del(last(cons(x, xs)), cons(x, xs)))

The TRS R consists of the following rules:

last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(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)
reverse(nil) → nil
reverse(cons(x, xs)) → cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

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

(29) UsableRulesProof (EQUIVALENT transformation)

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

(30) Obligation:

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

REVERSE(cons(x, xs)) → REVERSE(del(last(cons(x, xs)), cons(x, xs)))

The TRS R consists of the following rules:

last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
del(x, cons(y, xs)) → if(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)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
del(x, nil) → nil

The set Q consists of the following terms:

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
reverse(nil)
reverse(cons(x0, x1))

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

(31) QReductionProof (EQUIVALENT transformation)

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

reverse(nil)
reverse(cons(x0, x1))

(32) Obligation:

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

REVERSE(cons(x, xs)) → REVERSE(del(last(cons(x, xs)), cons(x, xs)))

The TRS R consists of the following rules:

last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
del(x, cons(y, xs)) → if(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)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
del(x, nil) → nil

The set Q consists of the following terms:

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
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.

(33) Induction-Processor (SOUND transformation)


This DP could be deleted by the Induction-Processor:
REVERSE(cons(x, xs)) → REVERSE(del(last(cons(x, xs)), cons(x, xs)))


This order was computed:
Polynomial interpretation [POLO]:

POL(0) = 3   
POL(REVERSE(x1)) = x1   
POL(cons(x1, x2)) = 1 + 2·x1 + 2·x2   
POL(del(x1, x2)) = x2   
POL(eq(x1, x2)) = 2·x1   
POL(false) = 0   
POL(if(x1, x2, x3, x4)) = 1 + 2·x3 + 2·x4   
POL(last(x1)) = 2 + 2·x1   
POL(nil) = 3   
POL(s(x1)) = x1   
POL(true) = 3   

At least one of these decreasing rules is always used after the deleted DP:
if(true, x595, y445, xs285) → xs285


The following formula is valid:
z0:sort[a24].(¬(z0 =nil)→del'(last(z0 ), z0 )=true)


The transformed set:
del'(x16, cons(y11, xs7)) → if'(eq(x16, y11), x16, y11, xs7)
if'(true, x59, y44, xs28) → true
if'(false, x68, y51, xs33) → del'(x68, xs33)
del'(x77, nil) → false
last(cons(x, nil)) → x
last(cons(x7, cons(y4, xs2))) → last(cons(y4, xs2))
del(x16, cons(y11, xs7)) → if(eq(x16, y11), x16, y11, xs7)
eq(0, 0) → true
eq(0, s(y24)) → false
eq(s(x41), 0) → false
eq(s(x50), s(y37)) → eq(x50, y37)
if(true, x59, y44, xs28) → xs28
if(false, x68, y51, xs33) → cons(y51, del(x68, xs33))
del(x77, nil) → nil
last(nil) → 0
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[a0](0, 0) → true
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a24](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a24](x0, x2), equal_sort[a24](x1, x3))
equal_sort[a24](cons(x0, x1), nil) → false
equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](nil, nil) → true
equal_sort[a42](witness_sort[a42], witness_sort[a42]) → true


The proof given by the theorem prover:
The following program was given to the internal theorem prover:
   [x, x0, x1, x2, x3, x59, y44, xs28, x68, y51, y11, xs7, x77, x16, x7, y4, xs2, y24, x41, x50, y37]
   equal_bool(true, false) -> false
   equal_bool(false, true) -> false
   equal_bool(true, true) -> true
   equal_bool(false, false) -> true
   true and x -> x
   false and x -> false
   true or x -> true
   false or 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[a0](0, 0) -> true
   equal_sort[a0](0, s(x0)) -> false
   equal_sort[a0](s(x0), 0) -> false
   equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1)
   equal_sort[a24](cons(x0, x1), cons(x2, x3)) -> equal_sort[a24](x0, x2) and equal_sort[a24](x1, x3)
   equal_sort[a24](cons(x0, x1), nil) -> false
   equal_sort[a24](nil, cons(x0, x1)) -> false
   equal_sort[a24](nil, nil) -> true
   equal_sort[a42](witness_sort[a42], witness_sort[a42]) -> true
   if'(true, x59, y44, xs28) -> true
   if'(false, x68, y51, cons(y11, xs7)) -> if'(eq(x68, y11), x68, y11, xs7)
   if'(false, x68, y51, nil) -> false
   del'(x77, nil) -> false
   equal_bool(eq(x16, y11), true) -> true | del'(x16, cons(y11, xs7)) -> true
   equal_bool(eq(x16, y11), true) -> false | del'(x16, cons(y11, xs7)) -> del'(x16, xs7)
   last(cons(x, nil)) -> x
   last(cons(x7, cons(y4, xs2))) -> last(cons(y4, xs2))
   last(nil) -> 0
   eq(0, 0) -> true
   eq(0, s(y24)) -> false
   eq(s(x41), 0) -> false
   eq(s(x50), s(y37)) -> eq(x50, y37)
   if(true, x59, y44, xs28) -> xs28
   if(false, x68, y51, cons(y11, xs7)) -> cons(y51, if(eq(x68, y11), x68, y11, xs7))
   if(false, x68, y51, nil) -> cons(y51, nil)
   del(x77, nil) -> nil
   equal_bool(eq(x16, y11), true) -> true | del(x16, cons(y11, xs7)) -> xs7
   equal_bool(eq(x16, y11), true) -> false | del(x16, cons(y11, xs7)) -> cons(y11, del(x16, xs7))


The following output was given by the internal theorem prover:
proof of internal
# AProVE Commit ID: 9a00b172b26c9abb2d4c4d5eaf341e919eb0fbf1 nowonder 20100222 unpublished dirty


Partial correctness of the following Program

   [x, x0, x1, x2, x3, x59, y44, xs28, x68, y51, y11, xs7, x77, x16, x7, y4, xs2, y24, x41, x50, y37]
   equal_bool(true, false) -> false
   equal_bool(false, true) -> false
   equal_bool(true, true) -> true
   equal_bool(false, false) -> true
   true and x -> x
   false and x -> false
   true or x -> true
   false or 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[a0](0, 0) -> true
   equal_sort[a0](0, s(x0)) -> false
   equal_sort[a0](s(x0), 0) -> false
   equal_sort[a0](s(x0), s(x1)) -> equal_sort[a0](x0, x1)
   equal_sort[a24](cons(x0, x1), cons(x2, x3)) -> equal_sort[a24](x0, x2) and equal_sort[a24](x1, x3)
   equal_sort[a24](cons(x0, x1), nil) -> false
   equal_sort[a24](nil, cons(x0, x1)) -> false
   equal_sort[a24](nil, nil) -> true
   equal_sort[a42](witness_sort[a42], witness_sort[a42]) -> true
   if'(true, x59, y44, xs28) -> true
   if'(false, x68, y51, cons(y11, xs7)) -> if'(eq(x68, y11), x68, y11, xs7)
   if'(false, x68, y51, nil) -> false
   del'(x77, nil) -> false
   equal_bool(eq(x16, y11), true) -> true | del'(x16, cons(y11, xs7)) -> true
   equal_bool(eq(x16, y11), true) -> false | del'(x16, cons(y11, xs7)) -> del'(x16, xs7)
   last(cons(x, nil)) -> x
   last(cons(x7, cons(y4, xs2))) -> last(cons(y4, xs2))
   last(nil) -> 0
   eq(0, 0) -> true
   eq(0, s(y24)) -> false
   eq(s(x41), 0) -> false
   eq(s(x50), s(y37)) -> eq(x50, y37)
   if(true, x59, y44, xs28) -> xs28
   if(false, x68, y51, cons(y11, xs7)) -> cons(y51, if(eq(x68, y11), x68, y11, xs7))
   if(false, x68, y51, nil) -> cons(y51, nil)
   del(x77, nil) -> nil
   equal_bool(eq(x16, y11), true) -> true | del(x16, cons(y11, xs7)) -> xs7
   equal_bool(eq(x16, y11), true) -> false | del(x16, cons(y11, xs7)) -> cons(y11, del(x16, xs7))

using the following formula:
z0:sort[a24].(~(z0=nil)->del'(last(z0), z0)=true)

could be successfully shown:
(0) Formula
(1) Induction by algorithm [EQUIVALENT]
(2) AND
    (3) Formula
        (4) Symbolic evaluation [EQUIVALENT]
        (5) Formula
        (6) Induction by data structure [EQUIVALENT]
        (7) AND
            (8) Formula
                (9) Symbolic evaluation [EQUIVALENT]
                (10) YES
            (11) Formula
                (12) Conditional Evaluation [EQUIVALENT]
                (13) AND
                    (14) Formula
                        (15) Symbolic evaluation [EQUIVALENT]
                        (16) YES
                    (17) Formula
                        (18) Symbolic evaluation [EQUIVALENT]
                        (19) Formula
                        (20) Hypothesis Lifting [EQUIVALENT]
                        (21) Formula
                        (22) Symbolic evaluation under hypothesis [SOUND]
                        (23) Formula
                        (24) Hypothesis Lifting [EQUIVALENT]
                        (25) Formula
                        (26) Hypothesis Lifting [EQUIVALENT]
                        (27) Formula
                        (28) Conditional Evaluation [EQUIVALENT]
                        (29) AND
                            (30) Formula
                                (31) Symbolic evaluation under hypothesis [EQUIVALENT]
                                (32) YES
                            (33) Formula
                                (34) Symbolic evaluation [EQUIVALENT]
                                (35) YES
    (36) Formula
        (37) Symbolic evaluation [EQUIVALENT]
        (38) YES
    (39) Formula
        (40) Symbolic evaluation [EQUIVALENT]
        (41) Formula
        (42) Conditional Evaluation [EQUIVALENT]
        (43) AND
            (44) Formula
                (45) Symbolic evaluation [EQUIVALENT]
                (46) YES
            (47) Formula
                (48) Symbolic evaluation under hypothesis [EQUIVALENT]
                (49) YES


----------------------------------------

(0)
Obligation:
Formula:
z0:sort[a24].(~(z0=nil)->del'(last(z0), z0)=true)

There are no hypotheses.




----------------------------------------

(1) Induction by algorithm (EQUIVALENT)
Induction by algorithm last(z0) generates the following cases:

1. Base Case:
Formula:
x:sort[a0].(~(cons(x, nil)=nil)->del'(last(cons(x, nil)), cons(x, nil))=true)

There are no hypotheses.





2. Base Case:
Formula:
(~(nil=nil)->del'(last(nil), nil)=true)

There are no hypotheses.





1. Step Case:
Formula:
x7:sort[a0],y4:sort[a0],xs2:sort[a24].(~(cons(x7, cons(y4, xs2))=nil)->del'(last(cons(x7, cons(y4, xs2))), cons(x7, cons(y4, xs2)))=true)

Hypotheses:
y4:sort[a0],xs2:sort[a24].del'(last(cons(y4, xs2)), cons(y4, xs2))=true






----------------------------------------

(2)
Complex Obligation (AND)

----------------------------------------

(3)
Obligation:
Formula:
x:sort[a0].(~(cons(x, nil)=nil)->del'(last(cons(x, nil)), cons(x, nil))=true)

There are no hypotheses.




----------------------------------------

(4) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
x:sort[a0].del'(x, cons(x, nil))=true
----------------------------------------

(5)
Obligation:
Formula:
x:sort[a0].del'(x, cons(x, nil))=true

There are no hypotheses.




----------------------------------------

(6) Induction by data structure (EQUIVALENT)
Induction by data structure sort[a0] generates the following cases:



1. Base Case:
Formula:
del'(0, cons(0, nil))=true

There are no hypotheses.





1. Step Case:
Formula:
n:sort[a0].del'(s(n), cons(s(n), nil))=true

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true






----------------------------------------

(7)
Complex Obligation (AND)

----------------------------------------

(8)
Obligation:
Formula:
del'(0, cons(0, nil))=true

There are no hypotheses.




----------------------------------------

(9) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(10)
YES

----------------------------------------

(11)
Obligation:
Formula:
n:sort[a0].del'(s(n), cons(s(n), nil))=true

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true




----------------------------------------

(12) Conditional Evaluation (EQUIVALENT)
The formula could be reduced to the following new obligations by conditional evaluation:
Formula:
true=true

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true
n:sort[a0].equal_bool(eq(s(n), s(n)), true)=true





Formula:
n:sort[a0].del'(s(n), nil)=true

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true
n:sort[a0].equal_bool(eq(s(n), s(n)), true)=false






----------------------------------------

(13)
Complex Obligation (AND)

----------------------------------------

(14)
Obligation:
Formula:
true=true

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true
n:sort[a0].equal_bool(eq(s(n), s(n)), true)=true




----------------------------------------

(15) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(16)
YES

----------------------------------------

(17)
Obligation:
Formula:
n:sort[a0].del'(s(n), nil)=true

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true
n:sort[a0].equal_bool(eq(s(n), s(n)), true)=false




----------------------------------------

(18) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
False
----------------------------------------

(19)
Obligation:
Formula:
False

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true
n:sort[a0].equal_bool(eq(s(n), s(n)), true)=false




----------------------------------------

(20) Hypothesis Lifting (EQUIVALENT)
Formula could be generalised by hypothesis lifting to the following new obligation:
Formula:
n:sort[a0].((del'(n, cons(n, nil))=true/\equal_bool(eq(s(n), s(n)), true)=false)->False)

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true
n:sort[a0].equal_bool(eq(s(n), s(n)), true)=false




----------------------------------------

(21)
Obligation:
Formula:
n:sort[a0].((del'(n, cons(n, nil))=true/\equal_bool(eq(s(n), s(n)), true)=false)->False)

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true
n:sort[a0].equal_bool(eq(s(n), s(n)), true)=false




----------------------------------------

(22) Symbolic evaluation under hypothesis (SOUND)
Could be reduced by symbolic evaluation under hypothesis to:
n:sort[a0].~(equal_bool(eq(n, n), true)=false)

By using the following hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true

----------------------------------------

(23)
Obligation:
Formula:
n:sort[a0].~(equal_bool(eq(n, n), true)=false)

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true
n:sort[a0].equal_bool(eq(s(n), s(n)), true)=false




----------------------------------------

(24) Hypothesis Lifting (EQUIVALENT)
Formula could be generalised by hypothesis lifting to the following new obligation:
Formula:
n:sort[a0].(equal_bool(eq(n, n), true)=false->~(equal_bool(eq(n, n), true)=false))

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true




----------------------------------------

(25)
Obligation:
Formula:
n:sort[a0].(equal_bool(eq(n, n), true)=false->~(equal_bool(eq(n, n), true)=false))

Hypotheses:
n:sort[a0].del'(n, cons(n, nil))=true




----------------------------------------

(26) Hypothesis Lifting (EQUIVALENT)
Formula could be generalised by hypothesis lifting to the following new obligation:
Formula:
n:sort[a0].(del'(n, cons(n, nil))=true->(equal_bool(eq(n, n), true)=false->~(equal_bool(eq(n, n), true)=false)))

There are no hypotheses.




----------------------------------------

(27)
Obligation:
Formula:
n:sort[a0].(del'(n, cons(n, nil))=true->(equal_bool(eq(n, n), true)=false->~(equal_bool(eq(n, n), true)=false)))

There are no hypotheses.




----------------------------------------

(28) Conditional Evaluation (EQUIVALENT)
The formula could be reduced to the following new obligations by conditional evaluation:
Formula:
n:sort[a0].(true=true->(equal_bool(eq(n, n), true)=false->~(equal_bool(eq(n, n), true)=false)))

Hypotheses:
n:sort[a0].equal_bool(eq(n, n), true)=true





Formula:
n:sort[a0].(del'(n, nil)=true->(equal_bool(eq(n, n), true)=false->~(equal_bool(eq(n, n), true)=false)))

Hypotheses:
n:sort[a0].equal_bool(eq(n, n), true)=false






----------------------------------------

(29)
Complex Obligation (AND)

----------------------------------------

(30)
Obligation:
Formula:
n:sort[a0].(true=true->(equal_bool(eq(n, n), true)=false->~(equal_bool(eq(n, n), true)=false)))

Hypotheses:
n:sort[a0].equal_bool(eq(n, n), true)=true




----------------------------------------

(31) Symbolic evaluation under hypothesis (EQUIVALENT)
Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses:

n:sort[a0].equal_bool(eq(n, n), true)=true

----------------------------------------

(32)
YES

----------------------------------------

(33)
Obligation:
Formula:
n:sort[a0].(del'(n, nil)=true->(equal_bool(eq(n, n), true)=false->~(equal_bool(eq(n, n), true)=false)))

Hypotheses:
n:sort[a0].equal_bool(eq(n, n), true)=false




----------------------------------------

(34) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(35)
YES

----------------------------------------

(36)
Obligation:
Formula:
(~(nil=nil)->del'(last(nil), nil)=true)

There are no hypotheses.




----------------------------------------

(37) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(38)
YES

----------------------------------------

(39)
Obligation:
Formula:
x7:sort[a0],y4:sort[a0],xs2:sort[a24].(~(cons(x7, cons(y4, xs2))=nil)->del'(last(cons(x7, cons(y4, xs2))), cons(x7, cons(y4, xs2)))=true)

Hypotheses:
y4:sort[a0],xs2:sort[a24].del'(last(cons(y4, xs2)), cons(y4, xs2))=true




----------------------------------------

(40) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
y4:sort[a0],xs2:sort[a24],x7:sort[a0].del'(last(cons(y4, xs2)), cons(x7, cons(y4, xs2)))=true
----------------------------------------

(41)
Obligation:
Formula:
y4:sort[a0],xs2:sort[a24],x7:sort[a0].del'(last(cons(y4, xs2)), cons(x7, cons(y4, xs2)))=true

Hypotheses:
y4:sort[a0],xs2:sort[a24].del'(last(cons(y4, xs2)), cons(y4, xs2))=true




----------------------------------------

(42) Conditional Evaluation (EQUIVALENT)
The formula could be reduced to the following new obligations by conditional evaluation:
Formula:
true=true

Hypotheses:
y4:sort[a0],xs2:sort[a24].del'(last(cons(y4, xs2)), cons(y4, xs2))=true
y4:sort[a0],xs2:sort[a24],x7:sort[a0].equal_bool(eq(last(cons(y4, xs2)), x7), true)=true





Formula:
y4:sort[a0],xs2:sort[a24].del'(last(cons(y4, xs2)), cons(y4, xs2))=true

Hypotheses:
y4:sort[a0],xs2:sort[a24].del'(last(cons(y4, xs2)), cons(y4, xs2))=true
y4:sort[a0],xs2:sort[a24],x7:sort[a0].equal_bool(eq(last(cons(y4, xs2)), x7), true)=false






----------------------------------------

(43)
Complex Obligation (AND)

----------------------------------------

(44)
Obligation:
Formula:
true=true

Hypotheses:
y4:sort[a0],xs2:sort[a24].del'(last(cons(y4, xs2)), cons(y4, xs2))=true
y4:sort[a0],xs2:sort[a24],x7:sort[a0].equal_bool(eq(last(cons(y4, xs2)), x7), true)=true




----------------------------------------

(45) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
True
----------------------------------------

(46)
YES

----------------------------------------

(47)
Obligation:
Formula:
y4:sort[a0],xs2:sort[a24].del'(last(cons(y4, xs2)), cons(y4, xs2))=true

Hypotheses:
y4:sort[a0],xs2:sort[a24].del'(last(cons(y4, xs2)), cons(y4, xs2))=true
y4:sort[a0],xs2:sort[a24],x7:sort[a0].equal_bool(eq(last(cons(y4, xs2)), x7), true)=false




----------------------------------------

(48) Symbolic evaluation under hypothesis (EQUIVALENT)
Could be shown using symbolic evaluation under hypothesis, by using the following hypotheses:

y4:sort[a0],xs2:sort[a24].del'(last(cons(y4, xs2)), cons(y4, xs2))=true

----------------------------------------

(49)
YES

(34) Complex Obligation (AND)

(35) Obligation:

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

last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
del(x, cons(y, xs)) → if(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)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
del(x, nil) → nil

The set Q consists of the following terms:

last(nil)
last(cons(x0, nil))
last(cons(x0, cons(x1, x2)))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
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.

(36) PisEmptyProof (EQUIVALENT transformation)

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

(37) YES

(38) Obligation:

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

del'(x16, cons(y11, xs7)) → if'(eq(x16, y11), x16, y11, xs7)
if'(true, x59, y44, xs28) → true
if'(false, x68, y51, xs33) → del'(x68, xs33)
del'(x77, nil) → false
last(cons(x, nil)) → x
last(cons(x7, cons(y4, xs2))) → last(cons(y4, xs2))
del(x16, cons(y11, xs7)) → if(eq(x16, y11), x16, y11, xs7)
eq(0, 0) → true
eq(0, s(y24)) → false
eq(s(x41), 0) → false
eq(s(x50), s(y37)) → eq(x50, y37)
if(true, x59, y44, xs28) → xs28
if(false, x68, y51, xs33) → cons(y51, del(x68, xs33))
del(x77, nil) → nil
last(nil) → 0
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[a0](0, 0) → true
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a24](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a24](x0, x2), equal_sort[a24](x1, x3))
equal_sort[a24](cons(x0, x1), nil) → false
equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](nil, nil) → true
equal_sort[a42](witness_sort[a42], witness_sort[a42]) → true

Q is empty.

(39) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Combined order from the following AFS and order.
del'(x1, x2)  =  del'(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
if'(x1, x2, x3, x4)  =  if'(x1, x2, x3, x4)
eq(x1, x2)  =  eq(x1, x2)
true  =  true
false  =  false
nil  =  nil
last(x1)  =  x1
del(x1, x2)  =  del(x1, x2)
if(x1, x2, x3, x4)  =  if(x1, x2, x3, x4)
0  =  0
s(x1)  =  s(x1)
equal_bool(x1, x2)  =  equal_bool(x1, x2)
and(x1, x2)  =  and(x1, x2)
or(x1, x2)  =  or(x1, x2)
not(x1)  =  not(x1)
isa_true(x1)  =  isa_true(x1)
isa_false(x1)  =  isa_false(x1)
equal_sort[a0](x1, x2)  =  equal_sort[a0](x1, x2)
equal_sort[a24](x1, x2)  =  equal_sort[a24](x1, x2)
equal_sort[a42](x1, x2)  =  equal_sort[a42](x1, x2)
witness_sort[a42]  =  witness_sort[a42]

Recursive path order with status [RPO].
Quasi-Precedence:
nil > 0 > [false, isafalse1] > [del'2, if'4] > [eq2, true, del2, if4, equalsort[a0]2] > cons2
s1 > [false, isafalse1] > [del'2, if'4] > [eq2, true, del2, if4, equalsort[a0]2] > cons2
equalbool2 > [false, isafalse1] > [del'2, if'4] > [eq2, true, del2, if4, equalsort[a0]2] > cons2
not1 > [false, isafalse1] > [del'2, if'4] > [eq2, true, del2, if4, equalsort[a0]2] > cons2
isatrue1 > [false, isafalse1] > [del'2, if'4] > [eq2, true, del2, if4, equalsort[a0]2] > cons2
equalsort[a24]2 > [eq2, true, del2, if4, equalsort[a0]2] > cons2
equalsort[a24]2 > and2
equalsort[a42]2 > [eq2, true, del2, if4, equalsort[a0]2] > cons2

Status:
del'2: [2,1]
cons2: multiset
if'4: [4,2,1,3]
eq2: [1,2]
true: multiset
false: multiset
nil: multiset
del2: [1,2]
if4: [2,4,1,3]
0: multiset
s1: multiset
equalbool2: [2,1]
and2: multiset
or2: [1,2]
not1: multiset
isatrue1: multiset
isafalse1: [1]
equalsort[a0]2: multiset
equalsort[a24]2: multiset
equalsort[a42]2: [1,2]
witnesssort[a42]: multiset

With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

del'(x16, cons(y11, xs7)) → if'(eq(x16, y11), x16, y11, xs7)
if'(true, x59, y44, xs28) → true
if'(false, x68, y51, xs33) → del'(x68, xs33)
del'(x77, nil) → false
last(cons(x, nil)) → x
last(cons(x7, cons(y4, xs2))) → last(cons(y4, xs2))
del(x16, cons(y11, xs7)) → if(eq(x16, y11), x16, y11, xs7)
eq(0, 0) → true
eq(0, s(y24)) → false
eq(s(x41), 0) → false
eq(s(x50), s(y37)) → eq(x50, y37)
if(true, x59, y44, xs28) → xs28
if(false, x68, y51, xs33) → cons(y51, del(x68, xs33))
del(x77, nil) → nil
last(nil) → 0
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[a0](0, 0) → true
equal_sort[a0](0, s(x0)) → false
equal_sort[a0](s(x0), 0) → false
equal_sort[a0](s(x0), s(x1)) → equal_sort[a0](x0, x1)
equal_sort[a24](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a24](x0, x2), equal_sort[a24](x1, x3))
equal_sort[a24](cons(x0, x1), nil) → false
equal_sort[a24](nil, cons(x0, x1)) → false
equal_sort[a24](nil, nil) → true
equal_sort[a42](witness_sort[a42], witness_sort[a42]) → true


(40) Obligation:

Q restricted rewrite system:
R is empty.
Q is empty.

(41) RisEmptyProof (EQUIVALENT transformation)

The TRS R is empty. Hence, termination is trivially proven.

(42) YES