(0) Obligation:

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

active(f(X)) → mark(cons(X, f(g(X))))
active(g(0)) → mark(s(0))
active(g(s(X))) → mark(s(s(g(X))))
active(sel(0, cons(X, Y))) → mark(X)
active(sel(s(X), cons(Y, Z))) → mark(sel(X, Z))
active(f(X)) → f(active(X))
active(cons(X1, X2)) → cons(active(X1), X2)
active(g(X)) → g(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
f(mark(X)) → mark(f(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
g(mark(X)) → mark(g(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
proper(f(X)) → f(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(g(X)) → g(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
f(ok(X)) → ok(f(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
g(ok(X)) → ok(g(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

(1) QTRSToCSRProof (EQUIVALENT transformation)

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

active(f(X)) → mark(cons(X, f(g(X))))
active(g(0)) → mark(s(0))
active(g(s(X))) → mark(s(s(g(X))))
active(sel(0, cons(X, Y))) → mark(X)
active(sel(s(X), cons(Y, Z))) → mark(sel(X, Z))
active(f(X)) → f(active(X))
active(cons(X1, X2)) → cons(active(X1), X2)
active(g(X)) → g(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
f(mark(X)) → mark(f(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
g(mark(X)) → mark(g(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
proper(f(X)) → f(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(g(X)) → g(proper(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
f(ok(X)) → ok(f(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
g(ok(X)) → ok(g(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
Special symbols used for the transformation (see [GM04]):
top: top, active: active, mark: mark, ok: ok, proper: proper
The replacement map contains the following entries:

f: {1}
cons: {1}
g: {1}
0: empty set
s: {1}
sel: {1, 2}
The QTRS contained all rules created by the complete Giesl-Middeldorp transformation. Therefore, the inverse transformation is complete (and sound).

(2) Obligation:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

f(X) → cons(X, f(g(X)))
g(0) → s(0)
g(s(X)) → s(s(g(X)))
sel(0, cons(X, Y)) → X
sel(s(X), cons(Y, Z)) → sel(X, Z)

The replacement map contains the following entries:

f: {1}
cons: {1}
g: {1}
0: empty set
s: {1}
sel: {1, 2}

(3) CSRInnermostProof (EQUIVALENT transformation)

The CSR is orthogonal. By [CS_Inn] we can switch to innermost.

(4) Obligation:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

f(X) → cons(X, f(g(X)))
g(0) → s(0)
g(s(X)) → s(s(g(X)))
sel(0, cons(X, Y)) → X
sel(s(X), cons(Y, Z)) → sel(X, Z)

The replacement map contains the following entries:

f: {1}
cons: {1}
g: {1}
0: empty set
s: {1}
sel: {1, 2}

Innermost Strategy.

(5) CSDependencyPairsProof (EQUIVALENT transformation)

Using Improved CS-DPs [LPAR08] we result in the following initial Q-CSDP problem.

(6) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {f, g, s, sel, G, SEL, F} are replacing on all positions.
For all symbols f in {cons} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The ordinary context-sensitive dependency pairs DPo are:

G(s(X)) → G(X)
SEL(s(X), cons(Y, Z)) → SEL(X, Z)

The collapsing dependency pairs are DPc:

SEL(s(X), cons(Y, Z)) → Z


The hidden terms of R are:

f(g(x0))
g(x0)

Every hiding context is built from:

g on positions {1}
f on positions {1}

Hence, the new unhiding pairs DPu are :

SEL(s(X), cons(Y, Z)) → U(Z)
U(g(x_0)) → U(x_0)
U(f(x_0)) → U(x_0)
U(f(g(x0))) → F(g(x0))
U(g(x0)) → G(x0)

The TRS R consists of the following rules:

f(X) → cons(X, f(g(X)))
g(0) → s(0)
g(s(X)) → s(s(g(X)))
sel(0, cons(X, Y)) → X
sel(s(X), cons(Y, Z)) → sel(X, Z)

The set Q consists of the following terms:

f(x0)
g(0)
g(s(x0))
sel(0, cons(x0, x1))
sel(s(x0), cons(x1, x2))

(7) QCSDependencyGraphProof (EQUIVALENT transformation)

The approximation of the Context-Sensitive Dependency Graph [LPAR08] contains 3 SCCs with 3 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {f, g, s, sel, G} are replacing on all positions.
For all symbols f in {cons} we have µ(f) = {1}.

The TRS P consists of the following rules:

G(s(X)) → G(X)

The TRS R consists of the following rules:

f(X) → cons(X, f(g(X)))
g(0) → s(0)
g(s(X)) → s(s(g(X)))
sel(0, cons(X, Y)) → X
sel(s(X), cons(Y, Z)) → sel(X, Z)

The set Q consists of the following terms:

f(x0)
g(0)
g(s(x0))
sel(0, cons(x0, x1))
sel(s(x0), cons(x1, x2))

(10) QCSDPSubtermProof (EQUIVALENT transformation)

We use the subterm processor [DA_EMMES].


The following pairs can be oriented strictly and are deleted.


G(s(X)) → G(X)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
G(x1)  =  x1

Subterm Order

(11) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {f, g, s, sel} are replacing on all positions.
For all symbols f in {cons} we have µ(f) = {1}.

The TRS P consists of the following rules:
none

The TRS R consists of the following rules:

f(X) → cons(X, f(g(X)))
g(0) → s(0)
g(s(X)) → s(s(g(X)))
sel(0, cons(X, Y)) → X
sel(s(X), cons(Y, Z)) → sel(X, Z)

The set Q consists of the following terms:

f(x0)
g(0)
g(s(x0))
sel(0, cons(x0, x1))
sel(s(x0), cons(x1, x2))

(12) PIsEmptyProof (EQUIVALENT transformation)

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

(13) TRUE

(14) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {f, g, s, sel} are replacing on all positions.
For all symbols f in {cons} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

U(g(x_0)) → U(x_0)
U(f(x_0)) → U(x_0)

The TRS R consists of the following rules:

f(X) → cons(X, f(g(X)))
g(0) → s(0)
g(s(X)) → s(s(g(X)))
sel(0, cons(X, Y)) → X
sel(s(X), cons(Y, Z)) → sel(X, Z)

The set Q consists of the following terms:

f(x0)
g(0)
g(s(x0))
sel(0, cons(x0, x1))
sel(s(x0), cons(x1, x2))

(15) QCSDPSubtermProof (EQUIVALENT transformation)

We use the subterm processor [DA_EMMES].


The following pairs can be oriented strictly and are deleted.


U(g(x_0)) → U(x_0)
U(f(x_0)) → U(x_0)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
U(x1)  =  x1

Subterm Order

(16) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {f, g, s, sel} are replacing on all positions.
For all symbols f in {cons} we have µ(f) = {1}.

The TRS P consists of the following rules:
none

The TRS R consists of the following rules:

f(X) → cons(X, f(g(X)))
g(0) → s(0)
g(s(X)) → s(s(g(X)))
sel(0, cons(X, Y)) → X
sel(s(X), cons(Y, Z)) → sel(X, Z)

The set Q consists of the following terms:

f(x0)
g(0)
g(s(x0))
sel(0, cons(x0, x1))
sel(s(x0), cons(x1, x2))

(17) PIsEmptyProof (EQUIVALENT transformation)

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

(18) TRUE

(19) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {f, g, s, sel, SEL} are replacing on all positions.
For all symbols f in {cons} we have µ(f) = {1}.

The TRS P consists of the following rules:

SEL(s(X), cons(Y, Z)) → SEL(X, Z)

The TRS R consists of the following rules:

f(X) → cons(X, f(g(X)))
g(0) → s(0)
g(s(X)) → s(s(g(X)))
sel(0, cons(X, Y)) → X
sel(s(X), cons(Y, Z)) → sel(X, Z)

The set Q consists of the following terms:

f(x0)
g(0)
g(s(x0))
sel(0, cons(x0, x1))
sel(s(x0), cons(x1, x2))

(20) QCSDPSubtermProof (EQUIVALENT transformation)

We use the subterm processor [DA_EMMES].


The following pairs can be oriented strictly and are deleted.


SEL(s(X), cons(Y, Z)) → SEL(X, Z)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
SEL(x1, x2)  =  x1

Subterm Order

(21) Obligation:

Q-restricted context-sensitive dependency pair problem:
The symbols in {f, g, s, sel} are replacing on all positions.
For all symbols f in {cons} we have µ(f) = {1}.

The TRS P consists of the following rules:
none

The TRS R consists of the following rules:

f(X) → cons(X, f(g(X)))
g(0) → s(0)
g(s(X)) → s(s(g(X)))
sel(0, cons(X, Y)) → X
sel(s(X), cons(Y, Z)) → sel(X, Z)

The set Q consists of the following terms:

f(x0)
g(0)
g(s(x0))
sel(0, cons(x0, x1))
sel(s(x0), cons(x1, x2))

(22) PIsEmptyProof (EQUIVALENT transformation)

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

(23) TRUE