Term Rewriting System R:
[X, Y, Z, X1, X2]
af(X) -> cons(mark(X), f(g(X)))
af(X) -> f(X)
ag(0) -> s(0)
ag(s(X)) -> s(s(ag(mark(X))))
ag(X) -> g(X)
asel(0, cons(X, Y)) -> mark(X)
asel(s(X), cons(Y, Z)) -> asel(mark(X), mark(Z))
asel(X1, X2) -> sel(X1, X2)
mark(f(X)) -> af(mark(X))
mark(g(X)) -> ag(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0
mark(s(X)) -> s(mark(X))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

AF(X) -> MARK(X)
AG(s(X)) -> AG(mark(X))
AG(s(X)) -> MARK(X)
ASEL(0, cons(X, Y)) -> MARK(X)
ASEL(s(X), cons(Y, Z)) -> ASEL(mark(X), mark(Z))
ASEL(s(X), cons(Y, Z)) -> MARK(X)
ASEL(s(X), cons(Y, Z)) -> MARK(Z)
MARK(f(X)) -> AF(mark(X))
MARK(f(X)) -> MARK(X)
MARK(g(X)) -> AG(mark(X))
MARK(g(X)) -> MARK(X)
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(sel(X1, X2)) -> MARK(X1)
MARK(sel(X1, X2)) -> MARK(X2)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

ASEL(s(X), cons(Y, Z)) -> MARK(Z)
ASEL(s(X), cons(Y, Z)) -> MARK(X)
ASEL(s(X), cons(Y, Z)) -> ASEL(mark(X), mark(Z))
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
ASEL(0, cons(X, Y)) -> MARK(X)
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(g(X)) -> MARK(X)
AG(s(X)) -> MARK(X)
AG(s(X)) -> AG(mark(X))
MARK(g(X)) -> AG(mark(X))
MARK(f(X)) -> MARK(X)
MARK(f(X)) -> AF(mark(X))
AF(X) -> MARK(X)


Rules:


af(X) -> cons(mark(X), f(g(X)))
af(X) -> f(X)
ag(0) -> s(0)
ag(s(X)) -> s(s(ag(mark(X))))
ag(X) -> g(X)
asel(0, cons(X, Y)) -> mark(X)
asel(s(X), cons(Y, Z)) -> asel(mark(X), mark(Z))
asel(X1, X2) -> sel(X1, X2)
mark(f(X)) -> af(mark(X))
mark(g(X)) -> ag(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0
mark(s(X)) -> s(mark(X))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

AG(s(X)) -> AG(mark(X))
six new Dependency Pairs are created:

AG(s(f(X''))) -> AG(af(mark(X'')))
AG(s(g(X''))) -> AG(ag(mark(X'')))
AG(s(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
AG(s(cons(X1', X2'))) -> AG(cons(mark(X1'), X2'))
AG(s(0)) -> AG(0)
AG(s(s(X''))) -> AG(s(mark(X'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Narrowing Transformation


Dependency Pairs:

AG(s(s(X''))) -> AG(s(mark(X'')))
AG(s(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
AG(s(g(X''))) -> AG(ag(mark(X'')))
AG(s(f(X''))) -> AG(af(mark(X'')))
ASEL(s(X), cons(Y, Z)) -> MARK(X)
ASEL(s(X), cons(Y, Z)) -> ASEL(mark(X), mark(Z))
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
ASEL(0, cons(X, Y)) -> MARK(X)
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(g(X)) -> MARK(X)
AG(s(X)) -> MARK(X)
MARK(g(X)) -> AG(mark(X))
MARK(f(X)) -> MARK(X)
AF(X) -> MARK(X)
MARK(f(X)) -> AF(mark(X))
ASEL(s(X), cons(Y, Z)) -> MARK(Z)


Rules:


af(X) -> cons(mark(X), f(g(X)))
af(X) -> f(X)
ag(0) -> s(0)
ag(s(X)) -> s(s(ag(mark(X))))
ag(X) -> g(X)
asel(0, cons(X, Y)) -> mark(X)
asel(s(X), cons(Y, Z)) -> asel(mark(X), mark(Z))
asel(X1, X2) -> sel(X1, X2)
mark(f(X)) -> af(mark(X))
mark(g(X)) -> ag(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0
mark(s(X)) -> s(mark(X))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

ASEL(s(X), cons(Y, Z)) -> ASEL(mark(X), mark(Z))
12 new Dependency Pairs are created:

ASEL(s(f(X'')), cons(Y, Z)) -> ASEL(af(mark(X'')), mark(Z))
ASEL(s(g(X'')), cons(Y, Z)) -> ASEL(ag(mark(X'')), mark(Z))
ASEL(s(sel(X1', X2')), cons(Y, Z)) -> ASEL(asel(mark(X1'), mark(X2')), mark(Z))
ASEL(s(cons(X1', X2')), cons(Y, Z)) -> ASEL(cons(mark(X1'), X2'), mark(Z))
ASEL(s(0), cons(Y, Z)) -> ASEL(0, mark(Z))
ASEL(s(s(X'')), cons(Y, Z)) -> ASEL(s(mark(X'')), mark(Z))
ASEL(s(X), cons(Y, f(X''))) -> ASEL(mark(X), af(mark(X'')))
ASEL(s(X), cons(Y, g(X''))) -> ASEL(mark(X), ag(mark(X'')))
ASEL(s(X), cons(Y, sel(X1', X2'))) -> ASEL(mark(X), asel(mark(X1'), mark(X2')))
ASEL(s(X), cons(Y, cons(X1', X2'))) -> ASEL(mark(X), cons(mark(X1'), X2'))
ASEL(s(X), cons(Y, 0)) -> ASEL(mark(X), 0)
ASEL(s(X), cons(Y, s(X''))) -> ASEL(mark(X), s(mark(X'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 3
Narrowing Transformation


Dependency Pairs:

ASEL(s(X), cons(Y, cons(X1', X2'))) -> ASEL(mark(X), cons(mark(X1'), X2'))
ASEL(s(X), cons(Y, sel(X1', X2'))) -> ASEL(mark(X), asel(mark(X1'), mark(X2')))
ASEL(s(X), cons(Y, g(X''))) -> ASEL(mark(X), ag(mark(X'')))
ASEL(s(X), cons(Y, f(X''))) -> ASEL(mark(X), af(mark(X'')))
ASEL(s(s(X'')), cons(Y, Z)) -> ASEL(s(mark(X'')), mark(Z))
ASEL(s(0), cons(Y, Z)) -> ASEL(0, mark(Z))
ASEL(s(sel(X1', X2')), cons(Y, Z)) -> ASEL(asel(mark(X1'), mark(X2')), mark(Z))
ASEL(s(g(X'')), cons(Y, Z)) -> ASEL(ag(mark(X'')), mark(Z))
ASEL(s(f(X'')), cons(Y, Z)) -> ASEL(af(mark(X'')), mark(Z))
ASEL(s(X), cons(Y, Z)) -> MARK(Z)
ASEL(s(X), cons(Y, Z)) -> MARK(X)
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
ASEL(0, cons(X, Y)) -> MARK(X)
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(g(X)) -> MARK(X)
AG(s(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
AG(s(g(X''))) -> AG(ag(mark(X'')))
AG(s(f(X''))) -> AG(af(mark(X'')))
MARK(g(X)) -> AG(mark(X))
MARK(f(X)) -> MARK(X)
AF(X) -> MARK(X)
MARK(f(X)) -> AF(mark(X))
AG(s(X)) -> MARK(X)
AG(s(s(X''))) -> AG(s(mark(X'')))


Rules:


af(X) -> cons(mark(X), f(g(X)))
af(X) -> f(X)
ag(0) -> s(0)
ag(s(X)) -> s(s(ag(mark(X))))
ag(X) -> g(X)
asel(0, cons(X, Y)) -> mark(X)
asel(s(X), cons(Y, Z)) -> asel(mark(X), mark(Z))
asel(X1, X2) -> sel(X1, X2)
mark(f(X)) -> af(mark(X))
mark(g(X)) -> ag(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0
mark(s(X)) -> s(mark(X))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(g(X)) -> AG(mark(X))
six new Dependency Pairs are created:

MARK(g(f(X''))) -> AG(af(mark(X'')))
MARK(g(g(X''))) -> AG(ag(mark(X'')))
MARK(g(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
MARK(g(cons(X1', X2'))) -> AG(cons(mark(X1'), X2'))
MARK(g(0)) -> AG(0)
MARK(g(s(X''))) -> AG(s(mark(X'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 4
Narrowing Transformation


Dependency Pairs:

ASEL(s(X), cons(Y, sel(X1', X2'))) -> ASEL(mark(X), asel(mark(X1'), mark(X2')))
ASEL(s(X), cons(Y, g(X''))) -> ASEL(mark(X), ag(mark(X'')))
ASEL(s(X), cons(Y, f(X''))) -> ASEL(mark(X), af(mark(X'')))
ASEL(s(s(X'')), cons(Y, Z)) -> ASEL(s(mark(X'')), mark(Z))
ASEL(s(0), cons(Y, Z)) -> ASEL(0, mark(Z))
ASEL(s(sel(X1', X2')), cons(Y, Z)) -> ASEL(asel(mark(X1'), mark(X2')), mark(Z))
ASEL(s(g(X'')), cons(Y, Z)) -> ASEL(ag(mark(X'')), mark(Z))
ASEL(s(f(X'')), cons(Y, Z)) -> ASEL(af(mark(X'')), mark(Z))
ASEL(s(X), cons(Y, Z)) -> MARK(Z)
MARK(g(s(X''))) -> AG(s(mark(X'')))
MARK(g(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
AG(s(s(X''))) -> AG(s(mark(X'')))
AG(s(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
AG(s(g(X''))) -> AG(ag(mark(X'')))
AG(s(f(X''))) -> AG(af(mark(X'')))
MARK(g(g(X''))) -> AG(ag(mark(X'')))
AG(s(X)) -> MARK(X)
MARK(g(f(X''))) -> AG(af(mark(X'')))
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
ASEL(s(X), cons(Y, Z)) -> MARK(X)
MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
MARK(g(X)) -> MARK(X)
MARK(f(X)) -> MARK(X)
AF(X) -> MARK(X)
MARK(f(X)) -> AF(mark(X))
ASEL(0, cons(X, Y)) -> MARK(X)
ASEL(s(X), cons(Y, cons(X1', X2'))) -> ASEL(mark(X), cons(mark(X1'), X2'))


Rules:


af(X) -> cons(mark(X), f(g(X)))
af(X) -> f(X)
ag(0) -> s(0)
ag(s(X)) -> s(s(ag(mark(X))))
ag(X) -> g(X)
asel(0, cons(X, Y)) -> mark(X)
asel(s(X), cons(Y, Z)) -> asel(mark(X), mark(Z))
asel(X1, X2) -> sel(X1, X2)
mark(f(X)) -> af(mark(X))
mark(g(X)) -> ag(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0
mark(s(X)) -> s(mark(X))





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(sel(X1, X2)) -> ASEL(mark(X1), mark(X2))
12 new Dependency Pairs are created:

MARK(sel(f(X'), X2)) -> ASEL(af(mark(X')), mark(X2))
MARK(sel(g(X'), X2)) -> ASEL(ag(mark(X')), mark(X2))
MARK(sel(sel(X1'', X2''), X2)) -> ASEL(asel(mark(X1''), mark(X2'')), mark(X2))
MARK(sel(cons(X1'', X2''), X2)) -> ASEL(cons(mark(X1''), X2''), mark(X2))
MARK(sel(0, X2)) -> ASEL(0, mark(X2))
MARK(sel(s(X'), X2)) -> ASEL(s(mark(X')), mark(X2))
MARK(sel(X1, f(X'))) -> ASEL(mark(X1), af(mark(X')))
MARK(sel(X1, g(X'))) -> ASEL(mark(X1), ag(mark(X')))
MARK(sel(X1, sel(X1'', X2''))) -> ASEL(mark(X1), asel(mark(X1''), mark(X2'')))
MARK(sel(X1, cons(X1'', X2''))) -> ASEL(mark(X1), cons(mark(X1''), X2''))
MARK(sel(X1, 0)) -> ASEL(mark(X1), 0)
MARK(sel(X1, s(X'))) -> ASEL(mark(X1), s(mark(X')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 5
Negative Polynomial Order


Dependency Pairs:

MARK(sel(X1, cons(X1'', X2''))) -> ASEL(mark(X1), cons(mark(X1''), X2''))
MARK(sel(X1, sel(X1'', X2''))) -> ASEL(mark(X1), asel(mark(X1''), mark(X2'')))
MARK(sel(X1, g(X'))) -> ASEL(mark(X1), ag(mark(X')))
MARK(sel(X1, f(X'))) -> ASEL(mark(X1), af(mark(X')))
MARK(sel(s(X'), X2)) -> ASEL(s(mark(X')), mark(X2))
MARK(sel(0, X2)) -> ASEL(0, mark(X2))
ASEL(s(X), cons(Y, cons(X1', X2'))) -> ASEL(mark(X), cons(mark(X1'), X2'))
ASEL(s(X), cons(Y, g(X''))) -> ASEL(mark(X), ag(mark(X'')))
ASEL(s(X), cons(Y, f(X''))) -> ASEL(mark(X), af(mark(X'')))
ASEL(s(s(X'')), cons(Y, Z)) -> ASEL(s(mark(X'')), mark(Z))
ASEL(s(0), cons(Y, Z)) -> ASEL(0, mark(Z))
ASEL(s(sel(X1', X2')), cons(Y, Z)) -> ASEL(asel(mark(X1'), mark(X2')), mark(Z))
ASEL(s(g(X'')), cons(Y, Z)) -> ASEL(ag(mark(X'')), mark(Z))
ASEL(s(f(X'')), cons(Y, Z)) -> ASEL(af(mark(X'')), mark(Z))
MARK(sel(sel(X1'', X2''), X2)) -> ASEL(asel(mark(X1''), mark(X2'')), mark(X2))
ASEL(s(X), cons(Y, Z)) -> MARK(Z)
MARK(sel(g(X'), X2)) -> ASEL(ag(mark(X')), mark(X2))
ASEL(s(X), cons(Y, Z)) -> MARK(X)
MARK(sel(f(X'), X2)) -> ASEL(af(mark(X')), mark(X2))
MARK(g(s(X''))) -> AG(s(mark(X'')))
MARK(g(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
AG(s(s(X''))) -> AG(s(mark(X'')))
AG(s(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
AG(s(g(X''))) -> AG(ag(mark(X'')))
AG(s(f(X''))) -> AG(af(mark(X'')))
MARK(g(g(X''))) -> AG(ag(mark(X'')))
AG(s(X)) -> MARK(X)
MARK(g(f(X''))) -> AG(af(mark(X'')))
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
MARK(g(X)) -> MARK(X)
MARK(f(X)) -> MARK(X)
AF(X) -> MARK(X)
MARK(f(X)) -> AF(mark(X))
ASEL(0, cons(X, Y)) -> MARK(X)
ASEL(s(X), cons(Y, sel(X1', X2'))) -> ASEL(mark(X), asel(mark(X1'), mark(X2')))


Rules:


af(X) -> cons(mark(X), f(g(X)))
af(X) -> f(X)
ag(0) -> s(0)
ag(s(X)) -> s(s(ag(mark(X))))
ag(X) -> g(X)
asel(0, cons(X, Y)) -> mark(X)
asel(s(X), cons(Y, Z)) -> asel(mark(X), mark(Z))
asel(X1, X2) -> sel(X1, X2)
mark(f(X)) -> af(mark(X))
mark(g(X)) -> ag(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0
mark(s(X)) -> s(mark(X))





The following Dependency Pairs can be strictly oriented using the given order.

MARK(sel(X1, g(X'))) -> ASEL(mark(X1), ag(mark(X')))
ASEL(s(X), cons(Y, g(X''))) -> ASEL(mark(X), ag(mark(X'')))


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

mark(f(X)) -> af(mark(X))
mark(g(X)) -> ag(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0
mark(s(X)) -> s(mark(X))
asel(0, cons(X, Y)) -> mark(X)
asel(s(X), cons(Y, Z)) -> asel(mark(X), mark(Z))
asel(X1, X2) -> sel(X1, X2)
ag(0) -> s(0)
ag(s(X)) -> s(s(ag(mark(X))))
ag(X) -> g(X)
af(X) -> cons(mark(X), f(g(X)))
af(X) -> f(X)


Used ordering:
Polynomial Order with Interpretation:

POL( MARK(x1) ) = 1

POL( ASEL(x1, x2) ) = x2

POL( ag(x1) ) = 0

POL( cons(x1, x2) ) = 1

POL( mark(x1) ) = 1

POL( AG(x1) ) = 1

POL( asel(x1, x2) ) = 1

POL( AF(x1) ) = 1

POL( af(x1) ) = 1

POL( 0 ) = 0

POL( s(x1) ) = 0

POL( sel(x1, x2) ) = 0

POL( g(x1) ) = 0

POL( f(x1) ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 6
Negative Polynomial Order


Dependency Pairs:

MARK(sel(X1, cons(X1'', X2''))) -> ASEL(mark(X1), cons(mark(X1''), X2''))
MARK(sel(X1, sel(X1'', X2''))) -> ASEL(mark(X1), asel(mark(X1''), mark(X2'')))
MARK(sel(X1, f(X'))) -> ASEL(mark(X1), af(mark(X')))
MARK(sel(s(X'), X2)) -> ASEL(s(mark(X')), mark(X2))
MARK(sel(0, X2)) -> ASEL(0, mark(X2))
ASEL(s(X), cons(Y, cons(X1', X2'))) -> ASEL(mark(X), cons(mark(X1'), X2'))
ASEL(s(X), cons(Y, f(X''))) -> ASEL(mark(X), af(mark(X'')))
ASEL(s(s(X'')), cons(Y, Z)) -> ASEL(s(mark(X'')), mark(Z))
ASEL(s(0), cons(Y, Z)) -> ASEL(0, mark(Z))
ASEL(s(sel(X1', X2')), cons(Y, Z)) -> ASEL(asel(mark(X1'), mark(X2')), mark(Z))
ASEL(s(g(X'')), cons(Y, Z)) -> ASEL(ag(mark(X'')), mark(Z))
ASEL(s(f(X'')), cons(Y, Z)) -> ASEL(af(mark(X'')), mark(Z))
MARK(sel(sel(X1'', X2''), X2)) -> ASEL(asel(mark(X1''), mark(X2'')), mark(X2))
ASEL(s(X), cons(Y, Z)) -> MARK(Z)
MARK(sel(g(X'), X2)) -> ASEL(ag(mark(X')), mark(X2))
ASEL(s(X), cons(Y, Z)) -> MARK(X)
MARK(sel(f(X'), X2)) -> ASEL(af(mark(X')), mark(X2))
MARK(g(s(X''))) -> AG(s(mark(X'')))
MARK(g(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
AG(s(s(X''))) -> AG(s(mark(X'')))
AG(s(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
AG(s(g(X''))) -> AG(ag(mark(X'')))
AG(s(f(X''))) -> AG(af(mark(X'')))
MARK(g(g(X''))) -> AG(ag(mark(X'')))
AG(s(X)) -> MARK(X)
MARK(g(f(X''))) -> AG(af(mark(X'')))
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
MARK(g(X)) -> MARK(X)
MARK(f(X)) -> MARK(X)
AF(X) -> MARK(X)
MARK(f(X)) -> AF(mark(X))
ASEL(0, cons(X, Y)) -> MARK(X)
ASEL(s(X), cons(Y, sel(X1', X2'))) -> ASEL(mark(X), asel(mark(X1'), mark(X2')))


Rules:


af(X) -> cons(mark(X), f(g(X)))
af(X) -> f(X)
ag(0) -> s(0)
ag(s(X)) -> s(s(ag(mark(X))))
ag(X) -> g(X)
asel(0, cons(X, Y)) -> mark(X)
asel(s(X), cons(Y, Z)) -> asel(mark(X), mark(Z))
asel(X1, X2) -> sel(X1, X2)
mark(f(X)) -> af(mark(X))
mark(g(X)) -> ag(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0
mark(s(X)) -> s(mark(X))





The following Dependency Pairs can be strictly oriented using the given order.

ASEL(s(f(X'')), cons(Y, Z)) -> ASEL(af(mark(X'')), mark(Z))
MARK(sel(f(X'), X2)) -> ASEL(af(mark(X')), mark(X2))


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

mark(f(X)) -> af(mark(X))
mark(g(X)) -> ag(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0
mark(s(X)) -> s(mark(X))
asel(0, cons(X, Y)) -> mark(X)
asel(s(X), cons(Y, Z)) -> asel(mark(X), mark(Z))
asel(X1, X2) -> sel(X1, X2)
af(X) -> cons(mark(X), f(g(X)))
af(X) -> f(X)
ag(0) -> s(0)
ag(s(X)) -> s(s(ag(mark(X))))
ag(X) -> g(X)


Used ordering:
Polynomial Order with Interpretation:

POL( ASEL(x1, x2) ) = x1

POL( s(x1) ) = 1

POL( af(x1) ) = 0

POL( asel(x1, x2) ) = 1

POL( AG(x1) ) = 1

POL( MARK(x1) ) = 1

POL( mark(x1) ) = 1

POL( 0 ) = 1

POL( ag(x1) ) = 1

POL( AF(x1) ) = 1

POL( cons(x1, x2) ) = 0

POL( sel(x1, x2) ) = 0

POL( f(x1) ) = 0

POL( g(x1) ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 7
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

MARK(sel(X1, cons(X1'', X2''))) -> ASEL(mark(X1), cons(mark(X1''), X2''))
MARK(sel(X1, sel(X1'', X2''))) -> ASEL(mark(X1), asel(mark(X1''), mark(X2'')))
MARK(sel(X1, f(X'))) -> ASEL(mark(X1), af(mark(X')))
MARK(sel(s(X'), X2)) -> ASEL(s(mark(X')), mark(X2))
MARK(sel(0, X2)) -> ASEL(0, mark(X2))
ASEL(s(X), cons(Y, cons(X1', X2'))) -> ASEL(mark(X), cons(mark(X1'), X2'))
ASEL(s(X), cons(Y, f(X''))) -> ASEL(mark(X), af(mark(X'')))
ASEL(s(s(X'')), cons(Y, Z)) -> ASEL(s(mark(X'')), mark(Z))
ASEL(s(0), cons(Y, Z)) -> ASEL(0, mark(Z))
ASEL(s(sel(X1', X2')), cons(Y, Z)) -> ASEL(asel(mark(X1'), mark(X2')), mark(Z))
ASEL(s(g(X'')), cons(Y, Z)) -> ASEL(ag(mark(X'')), mark(Z))
MARK(sel(sel(X1'', X2''), X2)) -> ASEL(asel(mark(X1''), mark(X2'')), mark(X2))
ASEL(s(X), cons(Y, Z)) -> MARK(Z)
MARK(sel(g(X'), X2)) -> ASEL(ag(mark(X')), mark(X2))
ASEL(s(X), cons(Y, Z)) -> MARK(X)
MARK(g(s(X''))) -> AG(s(mark(X'')))
MARK(g(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
AG(s(s(X''))) -> AG(s(mark(X'')))
AG(s(sel(X1', X2'))) -> AG(asel(mark(X1'), mark(X2')))
AG(s(g(X''))) -> AG(ag(mark(X'')))
AG(s(f(X''))) -> AG(af(mark(X'')))
MARK(g(g(X''))) -> AG(ag(mark(X'')))
AG(s(X)) -> MARK(X)
MARK(g(f(X''))) -> AG(af(mark(X'')))
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(sel(X1, X2)) -> MARK(X2)
MARK(sel(X1, X2)) -> MARK(X1)
MARK(g(X)) -> MARK(X)
MARK(f(X)) -> MARK(X)
AF(X) -> MARK(X)
MARK(f(X)) -> AF(mark(X))
ASEL(0, cons(X, Y)) -> MARK(X)
ASEL(s(X), cons(Y, sel(X1', X2'))) -> ASEL(mark(X), asel(mark(X1'), mark(X2')))


Rules:


af(X) -> cons(mark(X), f(g(X)))
af(X) -> f(X)
ag(0) -> s(0)
ag(s(X)) -> s(s(ag(mark(X))))
ag(X) -> g(X)
asel(0, cons(X, Y)) -> mark(X)
asel(s(X), cons(Y, Z)) -> asel(mark(X), mark(Z))
asel(X1, X2) -> sel(X1, X2)
mark(f(X)) -> af(mark(X))
mark(g(X)) -> ag(mark(X))
mark(sel(X1, X2)) -> asel(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0
mark(s(X)) -> s(mark(X))




The Proof could not be continued due to a Timeout.
Termination of R could not be shown.
Duration:
1:00 minutes