(0) Obligation:

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

is_empty(nil) → true
is_empty(cons(x, l)) → false
hd(cons(x, l)) → x
tl(cons(x, l)) → l
append(l1, l2) → ifappend(l1, l2, l1)
ifappend(l1, l2, nil) → l2
ifappend(l1, l2, cons(x, l)) → cons(x, append(l, l2))

Q is empty.

(1) AAECC Innermost (EQUIVALENT transformation)

We have applied [NOC,AAECCNOC] to switch to innermost. The TRS R 1 is

hd(cons(x, l)) → x
tl(cons(x, l)) → l
ifappend(l1, l2, nil) → l2
ifappend(l1, l2, cons(x, l)) → cons(x, append(l, l2))
append(l1, l2) → ifappend(l1, l2, l1)

The TRS R 2 is

is_empty(nil) → true
is_empty(cons(x, l)) → false

The signature Sigma is {true, is_empty, false}

(2) Obligation:

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

is_empty(nil) → true
is_empty(cons(x, l)) → false
hd(cons(x, l)) → x
tl(cons(x, l)) → l
append(l1, l2) → ifappend(l1, l2, l1)
ifappend(l1, l2, nil) → l2
ifappend(l1, l2, cons(x, l)) → cons(x, append(l, l2))

The set Q consists of the following terms:

is_empty(nil)
is_empty(cons(x0, x1))
hd(cons(x0, x1))
tl(cons(x0, x1))
append(x0, x1)
ifappend(x0, x1, nil)
ifappend(x0, x1, cons(x2, x3))

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

APPEND(l1, l2) → IFAPPEND(l1, l2, l1)
IFAPPEND(l1, l2, cons(x, l)) → APPEND(l, l2)

The TRS R consists of the following rules:

is_empty(nil) → true
is_empty(cons(x, l)) → false
hd(cons(x, l)) → x
tl(cons(x, l)) → l
append(l1, l2) → ifappend(l1, l2, l1)
ifappend(l1, l2, nil) → l2
ifappend(l1, l2, cons(x, l)) → cons(x, append(l, l2))

The set Q consists of the following terms:

is_empty(nil)
is_empty(cons(x0, x1))
hd(cons(x0, x1))
tl(cons(x0, x1))
append(x0, x1)
ifappend(x0, x1, nil)
ifappend(x0, x1, cons(x2, x3))

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

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

(6) Obligation:

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

APPEND(l1, l2) → IFAPPEND(l1, l2, l1)
IFAPPEND(l1, l2, cons(x, l)) → APPEND(l, l2)

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

is_empty(nil)
is_empty(cons(x0, x1))
hd(cons(x0, x1))
tl(cons(x0, x1))
append(x0, x1)
ifappend(x0, x1, nil)
ifappend(x0, x1, cons(x2, x3))

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

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

is_empty(nil)
is_empty(cons(x0, x1))
hd(cons(x0, x1))
tl(cons(x0, x1))
append(x0, x1)
ifappend(x0, x1, nil)
ifappend(x0, x1, cons(x2, x3))

(8) Obligation:

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

APPEND(l1, l2) → IFAPPEND(l1, l2, l1)
IFAPPEND(l1, l2, cons(x, l)) → APPEND(l, l2)

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

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

  • IFAPPEND(l1, l2, cons(x, l)) → APPEND(l, l2)
    The graph contains the following edges 3 > 1, 2 >= 2

  • APPEND(l1, l2) → IFAPPEND(l1, l2, l1)
    The graph contains the following edges 1 >= 1, 2 >= 2, 1 >= 3

(10) TRUE