Term Rewriting System R:
[X, Y, L]
rev1(0, nil) -> 0
rev1(s(X), nil) -> s(X)
rev1(X, cons(Y, L)) -> rev1(Y, L)
rev(nil) -> nil
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))
rev2(X, nil) -> nil
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

REV1(X, cons(Y, L)) -> REV1(Y, L)
REV(cons(X, L)) -> REV1(X, L)
REV(cons(X, L)) -> REV2(X, L)
REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L))))
REV2(X, cons(Y, L)) -> REV(rev2(Y, L))
REV2(X, cons(Y, L)) -> REV2(Y, L)

Furthermore, R contains two SCCs.


   R
DPs
       →DP Problem 1
Usable Rules (Innermost)
       →DP Problem 2
Neg POLO


Dependency Pair:

REV1(X, cons(Y, L)) -> REV1(Y, L)


Rules:


rev1(0, nil) -> 0
rev1(s(X), nil) -> s(X)
rev1(X, cons(Y, L)) -> rev1(Y, L)
rev(nil) -> nil
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))
rev2(X, nil) -> nil
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))


Strategy:

innermost




As we are in the innermost case, we can delete all 7 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
           →DP Problem 3
Size-Change Principle
       →DP Problem 2
Neg POLO


Dependency Pair:

REV1(X, cons(Y, L)) -> REV1(Y, L)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. REV1(X, cons(Y, L)) -> REV1(Y, L)
and get the following Size-Change Graph(s):
{1} , {1}
2>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
2>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
cons(x1, x2) -> cons(x1, x2)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
Negative Polynomial Order


Dependency Pairs:

REV2(X, cons(Y, L)) -> REV2(Y, L)
REV2(X, cons(Y, L)) -> REV(rev2(Y, L))
REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L))))
REV(cons(X, L)) -> REV2(X, L)


Rules:


rev1(0, nil) -> 0
rev1(s(X), nil) -> s(X)
rev1(X, cons(Y, L)) -> rev1(Y, L)
rev(nil) -> nil
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))
rev2(X, nil) -> nil
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))


Strategy:

innermost




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

REV2(X, cons(Y, L)) -> REV2(Y, L)
REV2(X, cons(Y, L)) -> REV(rev2(Y, L))
REV(cons(X, L)) -> REV2(X, L)


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

rev1(0, nil) -> 0
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))
rev(nil) -> nil
rev2(X, nil) -> nil
rev1(s(X), nil) -> s(X)
rev1(X, cons(Y, L)) -> rev1(Y, L)
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))


Used ordering:
Polynomial Order with Interpretation:

POL( REV2(x1, x2) ) = x2

POL( cons(x1, x2) ) = x2 + 1

POL( REV(x1) ) = x1

POL( rev2(x1, x2) ) = x2

POL( rev(x1) ) = x1

POL( rev1(x1, x2) ) = 0

POL( 0 ) = 0

POL( nil ) = 0

POL( s(x1) ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
Neg POLO
           →DP Problem 4
Dependency Graph


Dependency Pair:

REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L))))


Rules:


rev1(0, nil) -> 0
rev1(s(X), nil) -> s(X)
rev1(X, cons(Y, L)) -> rev1(Y, L)
rev(nil) -> nil
rev(cons(X, L)) -> cons(rev1(X, L), rev2(X, L))
rev2(X, nil) -> nil
rev2(X, cons(Y, L)) -> rev(cons(X, rev(rev2(Y, L))))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:00 minutes