Term Rewriting System R:
[x, y, z]
rev(nil) -> nil
rev(++(x, y)) -> ++(rev1(x, y), rev2(x, y))
rev1(x, nil) -> x
rev1(x, ++(y, z)) -> rev1(y, z)
rev2(x, nil) -> nil
rev2(x, ++(y, z)) -> rev(++(x, rev(rev2(y, z))))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

REV(++(x, y)) -> REV1(x, y)
REV(++(x, y)) -> REV2(x, y)
REV1(x, ++(y, z)) -> REV1(y, z)
REV2(x, ++(y, z)) -> REV(++(x, rev(rev2(y, z))))
REV2(x, ++(y, z)) -> REV(rev2(y, z))
REV2(x, ++(y, z)) -> REV2(y, z)

Furthermore, R contains two SCCs.


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


Dependency Pair:

REV1(x, ++(y, z)) -> REV1(y, z)


Rules:


rev(nil) -> nil
rev(++(x, y)) -> ++(rev1(x, y), rev2(x, y))
rev1(x, nil) -> x
rev1(x, ++(y, z)) -> rev1(y, z)
rev2(x, nil) -> nil
rev2(x, ++(y, z)) -> rev(++(x, rev(rev2(y, z))))


Strategy:

innermost




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


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


Dependency Pair:

REV1(x, ++(y, z)) -> REV1(y, z)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. REV1(x, ++(y, z)) -> REV1(y, z)
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:
++(x1, x2) -> ++(x1, x2)

We obtain no new DP problems.


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


Dependency Pairs:

REV2(x, ++(y, z)) -> REV2(y, z)
REV2(x, ++(y, z)) -> REV(rev2(y, z))
REV2(x, ++(y, z)) -> REV(++(x, rev(rev2(y, z))))
REV(++(x, y)) -> REV2(x, y)


Rules:


rev(nil) -> nil
rev(++(x, y)) -> ++(rev1(x, y), rev2(x, y))
rev1(x, nil) -> x
rev1(x, ++(y, z)) -> rev1(y, z)
rev2(x, nil) -> nil
rev2(x, ++(y, z)) -> rev(++(x, rev(rev2(y, z))))


Strategy:

innermost




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

REV2(x, ++(y, z)) -> REV(rev2(y, z))
two new Dependency Pairs are created:

REV2(x, ++(y', nil)) -> REV(nil)
REV2(x, ++(y0, ++(y'', z''))) -> REV(rev(++(y0, rev(rev2(y'', z'')))))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

REV2(x, ++(y0, ++(y'', z''))) -> REV(rev(++(y0, rev(rev2(y'', z'')))))
REV(++(x, y)) -> REV2(x, y)
REV2(x, ++(y, z)) -> REV(++(x, rev(rev2(y, z))))
REV2(x, ++(y, z)) -> REV2(y, z)


Rules:


rev(nil) -> nil
rev(++(x, y)) -> ++(rev1(x, y), rev2(x, y))
rev1(x, nil) -> x
rev1(x, ++(y, z)) -> rev1(y, z)
rev2(x, nil) -> nil
rev2(x, ++(y, z)) -> rev(++(x, rev(rev2(y, z))))


Strategy:

innermost




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

REV2(x, ++(y0, ++(y'', z''))) -> REV(rev(++(y0, rev(rev2(y'', z'')))))


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

rev2(x, ++(y, z)) -> rev(++(x, rev(rev2(y, z))))
rev(nil) -> nil
rev2(x, nil) -> nil
rev(++(x, y)) -> ++(rev1(x, y), rev2(x, y))


Used ordering:
Polynomial Order with Interpretation:

POL( REV2(x1, x2) ) = max{0, x2 - 1}

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

POL( REV(x1) ) = max{0, x1 - 1}

POL( rev(x1) ) = x1

POL( rev2(x1, x2) ) = x2

POL( nil ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
Nar
           →DP Problem 4
Neg POLO
             ...
               →DP Problem 5
Negative Polynomial Order


Dependency Pairs:

REV(++(x, y)) -> REV2(x, y)
REV2(x, ++(y, z)) -> REV(++(x, rev(rev2(y, z))))
REV2(x, ++(y, z)) -> REV2(y, z)


Rules:


rev(nil) -> nil
rev(++(x, y)) -> ++(rev1(x, y), rev2(x, y))
rev1(x, nil) -> x
rev1(x, ++(y, z)) -> rev1(y, z)
rev2(x, nil) -> nil
rev2(x, ++(y, z)) -> rev(++(x, rev(rev2(y, z))))


Strategy:

innermost




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

REV(++(x, y)) -> REV2(x, y)
REV2(x, ++(y, z)) -> REV2(y, z)


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

rev2(x, ++(y, z)) -> rev(++(x, rev(rev2(y, z))))
rev(nil) -> nil
rev2(x, nil) -> nil
rev(++(x, y)) -> ++(rev1(x, y), rev2(x, y))


Used ordering:
Polynomial Order with Interpretation:

POL( REV(x1) ) = x1

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

POL( REV2(x1, x2) ) = x2

POL( rev(x1) ) = x1

POL( rev2(x1, x2) ) = x2

POL( nil ) = 0


This results in one new DP problem.


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


Dependency Pair:

REV2(x, ++(y, z)) -> REV(++(x, rev(rev2(y, z))))


Rules:


rev(nil) -> nil
rev(++(x, y)) -> ++(rev1(x, y), rev2(x, y))
rev1(x, nil) -> x
rev1(x, ++(y, z)) -> rev1(y, z)
rev2(x, nil) -> nil
rev2(x, ++(y, z)) -> rev(++(x, rev(rev2(y, z))))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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