(0) Obligation:

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

concat(leaf, Y) → Y
concat(cons(U, V), Y) → cons(U, concat(V, Y))
lessleaves(X, leaf) → false
lessleaves(leaf, cons(W, Z)) → true
lessleaves(cons(U, V), cons(W, Z)) → lessleaves(concat(U, V), concat(W, Z))

Q is empty.

(1) AAECC Innermost (EQUIVALENT transformation)

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

concat(leaf, Y) → Y
concat(cons(U, V), Y) → cons(U, concat(V, Y))

The TRS R 2 is

lessleaves(X, leaf) → false
lessleaves(leaf, cons(W, Z)) → true
lessleaves(cons(U, V), cons(W, Z)) → lessleaves(concat(U, V), concat(W, Z))

The signature Sigma is {lessleaves, false, true}

(2) Obligation:

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

concat(leaf, Y) → Y
concat(cons(U, V), Y) → cons(U, concat(V, Y))
lessleaves(X, leaf) → false
lessleaves(leaf, cons(W, Z)) → true
lessleaves(cons(U, V), cons(W, Z)) → lessleaves(concat(U, V), concat(W, Z))

The set Q consists of the following terms:

concat(leaf, x0)
concat(cons(x0, x1), x2)
lessleaves(x0, leaf)
lessleaves(leaf, cons(x0, x1))
lessleaves(cons(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:

CONCAT(cons(U, V), Y) → CONCAT(V, Y)
LESSLEAVES(cons(U, V), cons(W, Z)) → LESSLEAVES(concat(U, V), concat(W, Z))
LESSLEAVES(cons(U, V), cons(W, Z)) → CONCAT(U, V)
LESSLEAVES(cons(U, V), cons(W, Z)) → CONCAT(W, Z)

The TRS R consists of the following rules:

concat(leaf, Y) → Y
concat(cons(U, V), Y) → cons(U, concat(V, Y))
lessleaves(X, leaf) → false
lessleaves(leaf, cons(W, Z)) → true
lessleaves(cons(U, V), cons(W, Z)) → lessleaves(concat(U, V), concat(W, Z))

The set Q consists of the following terms:

concat(leaf, x0)
concat(cons(x0, x1), x2)
lessleaves(x0, leaf)
lessleaves(leaf, cons(x0, x1))
lessleaves(cons(x0, x1), cons(x2, x3))

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

CONCAT(cons(U, V), Y) → CONCAT(V, Y)

The TRS R consists of the following rules:

concat(leaf, Y) → Y
concat(cons(U, V), Y) → cons(U, concat(V, Y))
lessleaves(X, leaf) → false
lessleaves(leaf, cons(W, Z)) → true
lessleaves(cons(U, V), cons(W, Z)) → lessleaves(concat(U, V), concat(W, Z))

The set Q consists of the following terms:

concat(leaf, x0)
concat(cons(x0, x1), x2)
lessleaves(x0, leaf)
lessleaves(leaf, cons(x0, x1))
lessleaves(cons(x0, x1), cons(x2, x3))

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

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


CONCAT(cons(U, V), Y) → CONCAT(V, Y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
CONCAT(x1, x2)  =  CONCAT(x1, x2)
cons(x1, x2)  =  cons(x1, x2)
concat(x1, x2)  =  concat(x1, x2)
leaf  =  leaf
lessleaves(x1, x2)  =  lessleaves(x2)
false  =  false
true  =  true

Lexicographic path order with status [LPO].
Quasi-Precedence:
CONCAT2 > [cons2, concat2, false, true]
leaf > [cons2, concat2, false, true]
lessleaves1 > [cons2, concat2, false, true]

Status:
CONCAT2: [1,2]
cons2: [1,2]
concat2: [1,2]
leaf: []
lessleaves1: [1]
false: []
true: []


The following usable rules [FROCOS05] were oriented:

concat(leaf, Y) → Y
concat(cons(U, V), Y) → cons(U, concat(V, Y))
lessleaves(X, leaf) → false
lessleaves(leaf, cons(W, Z)) → true
lessleaves(cons(U, V), cons(W, Z)) → lessleaves(concat(U, V), concat(W, Z))

(9) Obligation:

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

concat(leaf, Y) → Y
concat(cons(U, V), Y) → cons(U, concat(V, Y))
lessleaves(X, leaf) → false
lessleaves(leaf, cons(W, Z)) → true
lessleaves(cons(U, V), cons(W, Z)) → lessleaves(concat(U, V), concat(W, Z))

The set Q consists of the following terms:

concat(leaf, x0)
concat(cons(x0, x1), x2)
lessleaves(x0, leaf)
lessleaves(leaf, cons(x0, x1))
lessleaves(cons(x0, x1), cons(x2, x3))

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

(10) PisEmptyProof (EQUIVALENT transformation)

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

(11) TRUE

(12) Obligation:

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

LESSLEAVES(cons(U, V), cons(W, Z)) → LESSLEAVES(concat(U, V), concat(W, Z))

The TRS R consists of the following rules:

concat(leaf, Y) → Y
concat(cons(U, V), Y) → cons(U, concat(V, Y))
lessleaves(X, leaf) → false
lessleaves(leaf, cons(W, Z)) → true
lessleaves(cons(U, V), cons(W, Z)) → lessleaves(concat(U, V), concat(W, Z))

The set Q consists of the following terms:

concat(leaf, x0)
concat(cons(x0, x1), x2)
lessleaves(x0, leaf)
lessleaves(leaf, cons(x0, x1))
lessleaves(cons(x0, x1), cons(x2, x3))

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