(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, is_empty(l1))
ifappend(l1, l2, true) → l2
ifappend(l1, l2, false) → cons(hd(l1), append(tl(l1), l2))

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:

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, is_empty(l1))
ifappend(l1, l2, true) → l2
ifappend(l1, l2, false) → cons(hd(l1), append(tl(l1), 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, true)
ifappend(x0, x1, false)

(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, is_empty(l1))
APPEND(l1, l2) → IS_EMPTY(l1)
IFAPPEND(l1, l2, false) → HD(l1)
IFAPPEND(l1, l2, false) → APPEND(tl(l1), l2)
IFAPPEND(l1, l2, false) → TL(l1)

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, is_empty(l1))
ifappend(l1, l2, true) → l2
ifappend(l1, l2, false) → cons(hd(l1), append(tl(l1), 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, true)
ifappend(x0, x1, false)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Obligation:

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

IFAPPEND(l1, l2, false) → APPEND(tl(l1), l2)
APPEND(l1, l2) → IFAPPEND(l1, l2, is_empty(l1))

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, is_empty(l1))
ifappend(l1, l2, true) → l2
ifappend(l1, l2, false) → cons(hd(l1), append(tl(l1), 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, true)
ifappend(x0, x1, false)

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

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

(8) Obligation:

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

IFAPPEND(l1, l2, false) → APPEND(tl(l1), l2)
APPEND(l1, l2) → IFAPPEND(l1, l2, is_empty(l1))

The TRS R consists of the following rules:

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

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, true)
ifappend(x0, x1, false)

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

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

hd(cons(x0, x1))
append(x0, x1)
ifappend(x0, x1, true)
ifappend(x0, x1, false)

(10) Obligation:

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

IFAPPEND(l1, l2, false) → APPEND(tl(l1), l2)
APPEND(l1, l2) → IFAPPEND(l1, l2, is_empty(l1))

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

is_empty(nil)
is_empty(cons(x0, x1))
tl(cons(x0, x1))

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

(11) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


APPEND(l1, l2) → IFAPPEND(l1, l2, is_empty(l1))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO,RATPOLO]:

POL(IFAPPEND(x1, x2, x3)) = 1/2 + (3/4)x1 + (9/4)x3   
POL(false) = 1   
POL(APPEND(x1, x2)) = 9/4 + (2)x1   
POL(tl(x1)) = 1/4 + (1/4)x1   
POL(is_empty(x1)) = 1/2 + (1/2)x1   
POL(cons(x1, x2)) = 4 + (4)x2   
POL(nil) = 4   
POL(true) = 3/4   
The value of delta used in the strict ordering is 5/8.
The following usable rules [FROCOS05] were oriented:

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

(12) Obligation:

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

IFAPPEND(l1, l2, false) → APPEND(tl(l1), l2)

The TRS R consists of the following rules:

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

The set Q consists of the following terms:

is_empty(nil)
is_empty(cons(x0, x1))
tl(cons(x0, x1))

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

(13) DependencyGraphProof (EQUIVALENT transformation)

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

(14) TRUE