(0) Obligation:

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

double(0) → 0
double(s(x)) → s(s(double(x)))
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)
first(nil) → 0
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(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:

double(0) → 0
double(s(x)) → s(s(double(x)))
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)
first(nil) → 0
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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:

DOUBLE(s(x)) → DOUBLE(x)
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)
DOUBLELIST(cons(x, xs)) → DOUBLE(x)
DOUBLELIST(cons(x, xs)) → DOUBLELIST(del(first(cons(x, xs)), cons(x, xs)))
DOUBLELIST(cons(x, xs)) → DEL(first(cons(x, xs)), cons(x, xs))
DOUBLELIST(cons(x, xs)) → FIRST(cons(x, xs))

The TRS R consists of the following rules:

double(0) → 0
double(s(x)) → s(s(double(x)))
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)
first(nil) → 0
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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 4 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:

double(0) → 0
double(s(x)) → s(s(double(x)))
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)
first(nil) → 0
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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:

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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].

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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:

double(0) → 0
double(s(x)) → s(s(double(x)))
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)
first(nil) → 0
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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:

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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].

double(0)
double(s(x0))
del(x0, nil)
del(x0, cons(x1, x2))
if(true, x0, x1, x2)
if(false, x0, x1, x2)
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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:

DOUBLE(s(x)) → DOUBLE(x)

The TRS R consists of the following rules:

double(0) → 0
double(s(x)) → s(s(double(x)))
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)
first(nil) → 0
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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:

DOUBLE(s(x)) → DOUBLE(x)

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

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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].

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(cons(x0, x1))

(25) Obligation:

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

DOUBLE(s(x)) → DOUBLE(x)

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:

  • DOUBLE(s(x)) → DOUBLE(x)
    The graph contains the following edges 1 > 1

(27) YES

(28) Obligation:

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

DOUBLELIST(cons(x, xs)) → DOUBLELIST(del(first(cons(x, xs)), cons(x, xs)))

The TRS R consists of the following rules:

double(0) → 0
double(s(x)) → s(s(double(x)))
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)
first(nil) → 0
first(cons(x, xs)) → x
doublelist(nil) → nil
doublelist(cons(x, xs)) → cons(double(x), doublelist(del(first(cons(x, xs)), cons(x, xs))))

The set Q consists of the following terms:

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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:

DOUBLELIST(cons(x, xs)) → DOUBLELIST(del(first(cons(x, xs)), cons(x, xs)))

The TRS R consists of the following rules:

first(cons(x, xs)) → x
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:

double(0)
double(s(x0))
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))
first(nil)
first(cons(x0, x1))
doublelist(nil)
doublelist(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].

double(0)
double(s(x0))
doublelist(nil)
doublelist(cons(x0, x1))

(32) Obligation:

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

DOUBLELIST(cons(x, xs)) → DOUBLELIST(del(first(cons(x, xs)), cons(x, xs)))

The TRS R consists of the following rules:

first(cons(x, xs)) → x
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:

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))
first(nil)
first(cons(x0, x1))

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

(33) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule DOUBLELIST(cons(x, xs)) → DOUBLELIST(del(first(cons(x, xs)), cons(x, xs))) at position [0] we obtained the following new rules [LPAR04]:

DOUBLELIST(cons(x, xs)) → DOUBLELIST(if(eq(first(cons(x, xs)), x), first(cons(x, xs)), x, xs))

(34) Obligation:

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

DOUBLELIST(cons(x, xs)) → DOUBLELIST(if(eq(first(cons(x, xs)), x), first(cons(x, xs)), x, xs))

The TRS R consists of the following rules:

first(cons(x, xs)) → x
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:

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))
first(nil)
first(cons(x0, x1))

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

(35) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule DOUBLELIST(cons(x, xs)) → DOUBLELIST(if(eq(first(cons(x, xs)), x), first(cons(x, xs)), x, xs)) at position [0,0,0] we obtained the following new rules [LPAR04]:

DOUBLELIST(cons(x, xs)) → DOUBLELIST(if(eq(x, x), first(cons(x, xs)), x, xs))

(36) Obligation:

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

DOUBLELIST(cons(x, xs)) → DOUBLELIST(if(eq(x, x), first(cons(x, xs)), x, xs))

The TRS R consists of the following rules:

first(cons(x, xs)) → x
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:

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))
first(nil)
first(cons(x0, x1))

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

(37) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule DOUBLELIST(cons(x, xs)) → DOUBLELIST(if(eq(x, x), first(cons(x, xs)), x, xs)) at position [0,1] we obtained the following new rules [LPAR04]:

DOUBLELIST(cons(x, xs)) → DOUBLELIST(if(eq(x, x), x, x, xs))

(38) Obligation:

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

DOUBLELIST(cons(x, xs)) → DOUBLELIST(if(eq(x, x), x, x, xs))

The TRS R consists of the following rules:

first(cons(x, xs)) → x
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:

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))
first(nil)
first(cons(x0, x1))

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

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

(40) Obligation:

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

DOUBLELIST(cons(x, xs)) → DOUBLELIST(if(eq(x, x), x, x, xs))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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))
first(nil)
first(cons(x0, x1))

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

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

first(nil)
first(cons(x0, x1))

(42) Obligation:

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

DOUBLELIST(cons(x, xs)) → DOUBLELIST(if(eq(x, x), x, x, xs))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

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.

(43) Induction-Processor (SOUND transformation)


This DP could be deleted by the Induction-Processor:
DOUBLELIST(cons(x, xs)) → DOUBLELIST(if(eq(x, x), x, x, xs))


This order was computed:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(DOUBLELIST(x1)) = x1   
POL(cons(x1, x2)) = 1 + x2   
POL(del(x1, x2)) = x2   
POL(eq(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(if(x1, x2, x3, x4)) = 1 + x4   
POL(nil) = 0   
POL(s(x1)) = x1   
POL(true) = 0   

At least one of these decreasing rules is always used after the deleted DP:
if(true, x11'', y9'', xs4'') → xs4''


The following formula is valid:
x:sort[a19],xs:sort[a4].if'(eq(, ), , , xs )=true


The transformed set:
if'(true, x11, y9, xs4) → true
if'(false, x18, y15, xs8) → del'(x18, xs8)
del'(x25, cons(y21, xs12)) → if'(eq(x25, y21), x25, y21, xs12)
del'(x32, nil) → false
eq(0, 0) → true
eq(s(x4), s(y3)) → eq(x4, y3)
if(true, x11, y9, xs4) → xs4
if(false, x18, y15, xs8) → cons(y15, del(x18, xs8))
del(x25, cons(y21, xs12)) → if(eq(x25, y21), x25, y21, xs12)
del(x32, nil) → nil
eq(0, s(y32)) → false
eq(s(x45), 0) → false
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[a19](0, 0) → true
equal_sort[a19](0, s(x0)) → false
equal_sort[a19](s(x0), 0) → false
equal_sort[a19](s(x0), s(x1)) → equal_sort[a19](x0, x1)
equal_sort[a4](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a4](x0, x2), equal_sort[a4](x1, x3))
equal_sort[a4](cons(x0, x1), nil) → false
equal_sort[a4](nil, cons(x0, x1)) → false
equal_sort[a4](nil, nil) → true
equal_sort[a37](witness_sort[a37], witness_sort[a37]) → true


The proof given by the theorem prover:
The following program was given to the internal theorem prover:
   [x, x0, x1, x2, x3, x11, y9, xs4, x18, y15, y21, xs12, x32, x25, x4, y3, y32, x45]
   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[a19](0, 0) -> true
   equal_sort[a19](0, s(x0)) -> false
   equal_sort[a19](s(x0), 0) -> false
   equal_sort[a19](s(x0), s(x1)) -> equal_sort[a19](x0, x1)
   equal_sort[a4](cons(x0, x1), cons(x2, x3)) -> equal_sort[a4](x0, x2) and equal_sort[a4](x1, x3)
   equal_sort[a4](cons(x0, x1), nil) -> false
   equal_sort[a4](nil, cons(x0, x1)) -> false
   equal_sort[a4](nil, nil) -> true
   equal_sort[a37](witness_sort[a37], witness_sort[a37]) -> true
   if'(true, x11, y9, xs4) -> true
   if'(false, x18, y15, cons(y21, xs12)) -> if'(eq(x18, y21), x18, y21, xs12)
   if'(false, x18, y15, nil) -> false
   del'(x32, nil) -> false
   equal_bool(eq(x25, y21), true) -> true | del'(x25, cons(y21, xs12)) -> true
   equal_bool(eq(x25, y21), true) -> false | del'(x25, cons(y21, xs12)) -> del'(x25, xs12)
   eq(0, 0) -> true
   eq(s(x4), s(y3)) -> eq(x4, y3)
   eq(0, s(y32)) -> false
   eq(s(x45), 0) -> false
   if(true, x11, y9, xs4) -> xs4
   if(false, x18, y15, cons(y21, xs12)) -> cons(y15, if(eq(x18, y21), x18, y21, xs12))
   if(false, x18, y15, nil) -> cons(y15, nil)
   del(x32, nil) -> nil
   equal_bool(eq(x25, y21), true) -> true | del(x25, cons(y21, xs12)) -> xs12
   equal_bool(eq(x25, y21), true) -> false | del(x25, cons(y21, xs12)) -> cons(y21, del(x25, xs12))


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, x11, y9, xs4, x18, y15, y21, xs12, x32, x25, x4, y3, y32, x45]
   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[a19](0, 0) -> true
   equal_sort[a19](0, s(x0)) -> false
   equal_sort[a19](s(x0), 0) -> false
   equal_sort[a19](s(x0), s(x1)) -> equal_sort[a19](x0, x1)
   equal_sort[a4](cons(x0, x1), cons(x2, x3)) -> equal_sort[a4](x0, x2) and equal_sort[a4](x1, x3)
   equal_sort[a4](cons(x0, x1), nil) -> false
   equal_sort[a4](nil, cons(x0, x1)) -> false
   equal_sort[a4](nil, nil) -> true
   equal_sort[a37](witness_sort[a37], witness_sort[a37]) -> true
   if'(true, x11, y9, xs4) -> true
   if'(false, x18, y15, cons(y21, xs12)) -> if'(eq(x18, y21), x18, y21, xs12)
   if'(false, x18, y15, nil) -> false
   del'(x32, nil) -> false
   equal_bool(eq(x25, y21), true) -> true | del'(x25, cons(y21, xs12)) -> true
   equal_bool(eq(x25, y21), true) -> false | del'(x25, cons(y21, xs12)) -> del'(x25, xs12)
   eq(0, 0) -> true
   eq(s(x4), s(y3)) -> eq(x4, y3)
   eq(0, s(y32)) -> false
   eq(s(x45), 0) -> false
   if(true, x11, y9, xs4) -> xs4
   if(false, x18, y15, cons(y21, xs12)) -> cons(y15, if(eq(x18, y21), x18, y21, xs12))
   if(false, x18, y15, nil) -> cons(y15, nil)
   del(x32, nil) -> nil
   equal_bool(eq(x25, y21), true) -> true | del(x25, cons(y21, xs12)) -> xs12
   equal_bool(eq(x25, y21), true) -> false | del(x25, cons(y21, xs12)) -> cons(y21, del(x25, xs12))

using the following formula:
x:sort[a19],xs:sort[a4].if'(eq(x, x), x, x, xs)=true

could be successfully shown:
(0) Formula
(1) Induction by data structure [EQUIVALENT]
(2) AND
    (3) Formula
        (4) Symbolic evaluation [EQUIVALENT]
        (5) YES
    (6) Formula
        (7) Symbolic evaluation [EQUIVALENT]
        (8) Formula
        (9) Case Analysis [EQUIVALENT]
        (10) AND
            (11) Formula
                (12) Inverse Substitution [SOUND]
                (13) Formula
                (14) Induction by data structure [SOUND]
                (15) AND
                    (16) Formula
                        (17) Symbolic evaluation [EQUIVALENT]
                        (18) YES
                    (19) Formula
                        (20) Symbolic evaluation under hypothesis [EQUIVALENT]
                        (21) YES
            (22) Formula
                (23) Inverse Substitution [SOUND]
                (24) Formula
                (25) Induction by data structure [SOUND]
                (26) AND
                    (27) Formula
                        (28) Symbolic evaluation [EQUIVALENT]
                        (29) YES
                    (30) Formula
                        (31) Symbolic evaluation under hypothesis [EQUIVALENT]
                        (32) YES


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

(0)
Obligation:
Formula:
x:sort[a19],xs:sort[a4].if'(eq(x, x), x, x, xs)=true

There are no hypotheses.




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

(1) Induction by data structure (EQUIVALENT)
Induction by data structure sort[a19] generates the following cases:



1. Base Case:
Formula:
xs:sort[a4].if'(eq(0, 0), 0, 0, xs)=true

There are no hypotheses.





1. Step Case:
Formula:
n:sort[a19],xs:sort[a4].if'(eq(s(n), s(n)), s(n), s(n), xs)=true

Hypotheses:
n:sort[a19],!xs:sort[a4].if'(eq(n, n), n, n, xs)=true






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

(2)
Complex Obligation (AND)

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

(3)
Obligation:
Formula:
xs:sort[a4].if'(eq(0, 0), 0, 0, xs)=true

There are no hypotheses.




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

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

(5)
YES

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

(6)
Obligation:
Formula:
n:sort[a19],xs:sort[a4].if'(eq(s(n), s(n)), s(n), s(n), xs)=true

Hypotheses:
n:sort[a19],!xs:sort[a4].if'(eq(n, n), n, n, xs)=true




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

(7) Symbolic evaluation (EQUIVALENT)
Could be reduced to the following new obligation by simple symbolic evaluation:
n:sort[a19],xs:sort[a4].if'(eq(n, n), s(n), s(n), xs)=true
----------------------------------------

(8)
Obligation:
Formula:
n:sort[a19],xs:sort[a4].if'(eq(n, n), s(n), s(n), xs)=true

Hypotheses:
n:sort[a19],!xs:sort[a4].if'(eq(n, n), n, n, xs)=true




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

(9) Case Analysis (EQUIVALENT)
Case analysis leads to the following new obligations:

Formula:
n:sort[a19],x_1:sort[a19],x_2:sort[a4].if'(eq(n, n), s(n), s(n), cons(x_1, x_2))=true

Hypotheses:
n:sort[a19],!xs:sort[a4].if'(eq(n, n), n, n, xs)=true





Formula:
n:sort[a19].if'(eq(n, n), s(n), s(n), nil)=true

Hypotheses:
n:sort[a19],!xs:sort[a4].if'(eq(n, n), n, n, xs)=true






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

(10)
Complex Obligation (AND)

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

(11)
Obligation:
Formula:
n:sort[a19],x_1:sort[a19],x_2:sort[a4].if'(eq(n, n), s(n), s(n), cons(x_1, x_2))=true

Hypotheses:
n:sort[a19],!xs:sort[a4].if'(eq(n, n), n, n, xs)=true




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

(12) Inverse Substitution (SOUND)
The formula could be generalised by inverse substitution to:
n:sort[a19],n':sort[a19],x_1:sort[a19],x_2:sort[a4].if'(eq(n, n), n', n', cons(x_1, x_2))=true

Inverse substitution used:
[s(n)/n']


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

(13)
Obligation:
Formula:
n:sort[a19],n':sort[a19],x_1:sort[a19],x_2:sort[a4].if'(eq(n, n), n', n', cons(x_1, x_2))=true

Hypotheses:
n:sort[a19],!xs:sort[a4].if'(eq(n, n), n, n, xs)=true




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

(14) Induction by data structure (SOUND)
Induction by data structure sort[a19] generates the following cases:



1. Base Case:
Formula:
n':sort[a19],x_1:sort[a19],x_2:sort[a4].if'(eq(0, 0), n', n', cons(x_1, x_2))=true

There are no hypotheses.





1. Step Case:
Formula:
n'':sort[a19],n':sort[a19],x_1:sort[a19],x_2:sort[a4].if'(eq(s(n''), s(n'')), n', n', cons(x_1, x_2))=true

Hypotheses:
n'':sort[a19],!n':sort[a19],!x_1:sort[a19],!x_2:sort[a4].if'(eq(n'', n''), n', n', cons(x_1, x_2))=true






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

(15)
Complex Obligation (AND)

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

(16)
Obligation:
Formula:
n':sort[a19],x_1:sort[a19],x_2:sort[a4].if'(eq(0, 0), n', n', cons(x_1, x_2))=true

There are no hypotheses.




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

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

(18)
YES

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

(19)
Obligation:
Formula:
n'':sort[a19],n':sort[a19],x_1:sort[a19],x_2:sort[a4].if'(eq(s(n''), s(n'')), n', n', cons(x_1, x_2))=true

Hypotheses:
n'':sort[a19],!n':sort[a19],!x_1:sort[a19],!x_2:sort[a4].if'(eq(n'', n''), n', n', cons(x_1, x_2))=true




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

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

n'':sort[a19],!n':sort[a19],!x_1:sort[a19],!x_2:sort[a4].if'(eq(n'', n''), n', n', cons(x_1, x_2))=true

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

(21)
YES

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

(22)
Obligation:
Formula:
n:sort[a19].if'(eq(n, n), s(n), s(n), nil)=true

Hypotheses:
n:sort[a19],!xs:sort[a4].if'(eq(n, n), n, n, xs)=true




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

(23) Inverse Substitution (SOUND)
The formula could be generalised by inverse substitution to:
n:sort[a19],n':sort[a19].if'(eq(n, n), n', n', nil)=true

Inverse substitution used:
[s(n)/n']


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

(24)
Obligation:
Formula:
n:sort[a19],n':sort[a19].if'(eq(n, n), n', n', nil)=true

Hypotheses:
n:sort[a19],!xs:sort[a4].if'(eq(n, n), n, n, xs)=true




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

(25) Induction by data structure (SOUND)
Induction by data structure sort[a19] generates the following cases:



1. Base Case:
Formula:
n':sort[a19].if'(eq(0, 0), n', n', nil)=true

There are no hypotheses.





1. Step Case:
Formula:
n'':sort[a19],n':sort[a19].if'(eq(s(n''), s(n'')), n', n', nil)=true

Hypotheses:
n'':sort[a19],!n':sort[a19].if'(eq(n'', n''), n', n', nil)=true






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

(26)
Complex Obligation (AND)

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

(27)
Obligation:
Formula:
n':sort[a19].if'(eq(0, 0), n', n', nil)=true

There are no hypotheses.




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

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

(29)
YES

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

(30)
Obligation:
Formula:
n'':sort[a19],n':sort[a19].if'(eq(s(n''), s(n'')), n', n', nil)=true

Hypotheses:
n'':sort[a19],!n':sort[a19].if'(eq(n'', n''), n', n', nil)=true




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

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

n'':sort[a19],!n':sort[a19].if'(eq(n'', n''), n', n', nil)=true

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

(32)
YES

(44) Complex Obligation (AND)

(45) Obligation:

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

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

The set Q consists of the following terms:

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.

(46) PisEmptyProof (EQUIVALENT transformation)

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

(47) YES

(48) Obligation:

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

if'(true, x11, y9, xs4) → true
if'(false, x18, y15, xs8) → del'(x18, xs8)
del'(x25, cons(y21, xs12)) → if'(eq(x25, y21), x25, y21, xs12)
del'(x32, nil) → false
eq(0, 0) → true
eq(s(x4), s(y3)) → eq(x4, y3)
if(true, x11, y9, xs4) → xs4
if(false, x18, y15, xs8) → cons(y15, del(x18, xs8))
del(x25, cons(y21, xs12)) → if(eq(x25, y21), x25, y21, xs12)
del(x32, nil) → nil
eq(0, s(y32)) → false
eq(s(x45), 0) → false
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[a19](0, 0) → true
equal_sort[a19](0, s(x0)) → false
equal_sort[a19](s(x0), 0) → false
equal_sort[a19](s(x0), s(x1)) → equal_sort[a19](x0, x1)
equal_sort[a4](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a4](x0, x2), equal_sort[a4](x1, x3))
equal_sort[a4](cons(x0, x1), nil) → false
equal_sort[a4](nil, cons(x0, x1)) → false
equal_sort[a4](nil, nil) → true
equal_sort[a37](witness_sort[a37], witness_sort[a37]) → true

Q is empty.

(49) QTRSRRRProof (EQUIVALENT transformation)

Used ordering:
Recursive path order with status [RPO].
Quasi-Precedence:
[if4, del2] > [false, nil, s1, not1, equalsort[a19]2] > cons2 > [if'4, del'2] > [true, eq2, isatrue1]
[if4, del2] > [false, nil, s1, not1, equalsort[a19]2] > cons2 > and2
equalbool2 > [true, eq2, isatrue1]
or2 > [true, eq2, isatrue1]
isafalse1 > [false, nil, s1, not1, equalsort[a19]2] > cons2 > [if'4, del'2] > [true, eq2, isatrue1]
isafalse1 > [false, nil, s1, not1, equalsort[a19]2] > cons2 > and2
equalsort[a4]2 > [false, nil, s1, not1, equalsort[a19]2] > cons2 > [if'4, del'2] > [true, eq2, isatrue1]
equalsort[a4]2 > [false, nil, s1, not1, equalsort[a19]2] > cons2 > and2
equalsort[a37]2 > [true, eq2, isatrue1]
witnesssort[a37] > [true, eq2, isatrue1]

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

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

if'(true, x11, y9, xs4) → true
if'(false, x18, y15, xs8) → del'(x18, xs8)
del'(x25, cons(y21, xs12)) → if'(eq(x25, y21), x25, y21, xs12)
del'(x32, nil) → false
eq(0, 0) → true
eq(s(x4), s(y3)) → eq(x4, y3)
if(true, x11, y9, xs4) → xs4
if(false, x18, y15, xs8) → cons(y15, del(x18, xs8))
del(x25, cons(y21, xs12)) → if(eq(x25, y21), x25, y21, xs12)
del(x32, nil) → nil
eq(0, s(y32)) → false
eq(s(x45), 0) → false
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[a19](0, 0) → true
equal_sort[a19](0, s(x0)) → false
equal_sort[a19](s(x0), 0) → false
equal_sort[a19](s(x0), s(x1)) → equal_sort[a19](x0, x1)
equal_sort[a4](cons(x0, x1), cons(x2, x3)) → and(equal_sort[a4](x0, x2), equal_sort[a4](x1, x3))
equal_sort[a4](cons(x0, x1), nil) → false
equal_sort[a4](nil, cons(x0, x1)) → false
equal_sort[a4](nil, nil) → true
equal_sort[a37](witness_sort[a37], witness_sort[a37]) → true


(50) Obligation:

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

(51) RisEmptyProof (EQUIVALENT transformation)

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

(52) YES