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
Forward Instantiation Transformation
       →DP Problem 2
Nar


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




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

REV1(X, cons(Y, L)) -> REV1(Y, L)
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
Forward Instantiation Transformation
       →DP Problem 2
Nar


Dependency Pair:

REV1(X, cons(Y0, cons(Y'', L''))) -> REV1(Y0, cons(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




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

REV1(X, cons(Y0, cons(Y'', L''))) -> REV1(Y0, cons(Y'', L''))
one new Dependency Pair is created:

REV1(X, cons(Y0'', cons(Y''0, cons(Y'''', L'''')))) -> REV1(Y0'', cons(Y''0, cons(Y'''', L'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 4
Polynomial Ordering
       →DP Problem 2
Nar


Dependency Pair:

REV1(X, cons(Y0'', cons(Y''0, cons(Y'''', L'''')))) -> REV1(Y0'', cons(Y''0, cons(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




The following dependency pair can be strictly oriented:

REV1(X, cons(Y0'', cons(Y''0, cons(Y'''', L'''')))) -> REV1(Y0'', cons(Y''0, cons(Y'''', L'''')))


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(REV1(x1, x2))=  x2  
  POL(cons(x1, x2))=  1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 5
Dependency Graph
       →DP Problem 2
Nar


Dependency Pair:


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.


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


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




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

REV2(X, cons(Y, L)) -> REV(rev2(Y, L))
two new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Rewriting Transformation


Dependency Pairs:

REV2(X, cons(Y0, cons(Y'', L''))) -> REV(rev(cons(Y0, rev(rev2(Y'', 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)) -> 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




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

REV2(X, cons(Y0, cons(Y'', L''))) -> REV(rev(cons(Y0, rev(rev2(Y'', L'')))))
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Rw
             ...
               →DP Problem 7
Forward Instantiation Transformation


Dependency Pairs:

REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))
REV2(X, cons(Y, L)) -> 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




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

REV(cons(X, L)) -> REV2(X, L)
two new Dependency Pairs are created:

REV(cons(X'', cons(Y'', L''))) -> REV2(X'', cons(Y'', L''))
REV(cons(X'', cons(Y0'', cons(Y'''', L'''')))) -> REV2(X'', cons(Y0'', cons(Y'''', L'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Rw
             ...
               →DP Problem 8
Narrowing Transformation


Dependency Pairs:

REV2(X, cons(Y, L)) -> REV2(Y, L)
REV(cons(X'', cons(Y0'', cons(Y'''', L'''')))) -> REV2(X'', cons(Y0'', cons(Y'''', L'''')))
REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L))))
REV(cons(X'', cons(Y'', L''))) -> REV2(X'', cons(Y'', L''))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, 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




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

REV2(X, cons(Y, L)) -> REV(cons(X, rev(rev2(Y, L))))
two new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Rw
             ...
               →DP Problem 9
Rewriting Transformation


Dependency Pairs:

REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(X, rev(rev(cons(Y0, rev(rev2(Y'', L'')))))))
REV(cons(X'', cons(Y0'', cons(Y'''', L'''')))) -> REV2(X'', cons(Y0'', cons(Y'''', L'''')))
REV2(X, cons(Y', nil)) -> REV(cons(X, rev(nil)))
REV(cons(X'', cons(Y'', L''))) -> REV2(X'', cons(Y'', L''))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))
REV2(X, cons(Y, L)) -> 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




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

REV2(X, cons(Y', nil)) -> REV(cons(X, rev(nil)))
one new Dependency Pair is created:

REV2(X, cons(Y', nil)) -> REV(cons(X, nil))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Rw
             ...
               →DP Problem 10
Rewriting Transformation


Dependency Pairs:

REV(cons(X'', cons(Y0'', cons(Y'''', L'''')))) -> REV2(X'', cons(Y0'', cons(Y'''', L'''')))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))
REV2(X, cons(Y, L)) -> REV2(Y, L)
REV(cons(X'', cons(Y'', L''))) -> REV2(X'', cons(Y'', L''))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(X, rev(rev(cons(Y0, 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




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

REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(X, rev(rev(cons(Y0, rev(rev2(Y'', L'')))))))
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Rw
             ...
               →DP Problem 11
Rewriting Transformation


Dependency Pairs:

REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(X, rev(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))))
REV(cons(X'', cons(Y'', L''))) -> REV2(X'', cons(Y'', L''))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))
REV2(X, cons(Y, L)) -> REV2(Y, L)
REV(cons(X'', cons(Y0'', cons(Y'''', L'''')))) -> REV2(X'', cons(Y0'', cons(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




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

REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(X, rev(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))))
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Rw
             ...
               →DP Problem 12
Forward Instantiation Transformation


Dependency Pairs:

REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(X, cons(rev1(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))), rev2(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))))
REV(cons(X'', cons(Y0'', cons(Y'''', L'''')))) -> REV2(X'', cons(Y0'', cons(Y'''', L'''')))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))
REV2(X, cons(Y, L)) -> REV2(Y, L)
REV(cons(X'', cons(Y'', L''))) -> REV2(X'', cons(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




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

REV2(X, cons(Y, L)) -> REV2(Y, L)
two new Dependency Pairs are created:

REV2(X, cons(Y0, cons(Y'', L''))) -> REV2(Y0, cons(Y'', L''))
REV2(X, cons(Y', cons(Y0'', cons(Y'''', L'''')))) -> REV2(Y', cons(Y0'', cons(Y'''', L'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Rw
             ...
               →DP Problem 13
Forward Instantiation Transformation


Dependency Pairs:

REV2(X, cons(Y', cons(Y0'', cons(Y'''', L'''')))) -> REV2(Y', cons(Y0'', cons(Y'''', L'''')))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV2(Y0, cons(Y'', L''))
REV(cons(X'', cons(Y0'', cons(Y'''', L'''')))) -> REV2(X'', cons(Y0'', cons(Y'''', L'''')))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))
REV(cons(X'', cons(Y'', L''))) -> REV2(X'', cons(Y'', L''))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(X, cons(rev1(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))), rev2(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, 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




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

REV(cons(X'', cons(Y'', L''))) -> REV2(X'', cons(Y'', L''))
two new Dependency Pairs are created:

REV(cons(X''', cons(Y''0, cons(Y'''', L'''')))) -> REV2(X''', cons(Y''0, cons(Y'''', L'''')))
REV(cons(X''', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))) -> REV2(X''', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Rw
             ...
               →DP Problem 14
Forward Instantiation Transformation


Dependency Pairs:

REV(cons(X''', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))) -> REV2(X''', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV2(Y0, cons(Y'', L''))
REV(cons(X''', cons(Y''0, cons(Y'''', L'''')))) -> REV2(X''', cons(Y''0, cons(Y'''', L'''')))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(X, cons(rev1(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))), rev2(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))))
REV(cons(X'', cons(Y0'', cons(Y'''', L'''')))) -> REV2(X'', cons(Y0'', cons(Y'''', L'''')))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))
REV2(X, cons(Y', cons(Y0'', cons(Y'''', L'''')))) -> REV2(Y', cons(Y0'', cons(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




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

REV2(X, cons(Y0, cons(Y'', L''))) -> REV2(Y0, cons(Y'', L''))
two new Dependency Pairs are created:

REV2(X, cons(Y0'', cons(Y''0, cons(Y'''', L'''')))) -> REV2(Y0'', cons(Y''0, cons(Y'''', L'''')))
REV2(X, cons(Y0', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))) -> REV2(Y0', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Rw
             ...
               →DP Problem 15
Polynomial Ordering


Dependency Pairs:

REV2(X, cons(Y0', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))) -> REV2(Y0', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))
REV2(X, cons(Y0'', cons(Y''0, cons(Y'''', L'''')))) -> REV2(Y0'', cons(Y''0, cons(Y'''', L'''')))
REV2(X, cons(Y', cons(Y0'', cons(Y'''', L'''')))) -> REV2(Y', cons(Y0'', cons(Y'''', L'''')))
REV(cons(X''', cons(Y''0, cons(Y'''', L'''')))) -> REV2(X''', cons(Y''0, cons(Y'''', L'''')))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(X, cons(rev1(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))), rev2(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))))
REV(cons(X'', cons(Y0'', cons(Y'''', L'''')))) -> REV2(X'', cons(Y0'', cons(Y'''', L'''')))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))
REV(cons(X''', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))) -> REV2(X''', cons(Y'''', cons(Y0'''', cons(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




The following dependency pairs can be strictly oriented:

REV2(X, cons(Y0', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))) -> REV2(Y0', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))
REV2(X, cons(Y0'', cons(Y''0, cons(Y'''', L'''')))) -> REV2(Y0'', cons(Y''0, cons(Y'''', L'''')))
REV2(X, cons(Y', cons(Y0'', cons(Y'''', L'''')))) -> REV2(Y', cons(Y0'', cons(Y'''', L'''')))
REV(cons(X''', cons(Y''0, cons(Y'''', L'''')))) -> REV2(X''', cons(Y''0, cons(Y'''', L'''')))
REV(cons(X'', cons(Y0'', cons(Y'''', L'''')))) -> REV2(X'', cons(Y0'', cons(Y'''', L'''')))
REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))))
REV(cons(X''', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))) -> REV2(X''', cons(Y'''', cons(Y0'''', cons(Y'''''', L''''''))))


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS can be oriented:

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


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(rev2(x1, x2))=  x2  
  POL(rev(x1))=  x1  
  POL(0)=  0  
  POL(REV(x1))=  x1  
  POL(cons(x1, x2))=  1 + x2  
  POL(rev1(x1, x2))=  0  
  POL(REV2(x1, x2))=  x2  
  POL(nil)=  0  
  POL(s(x1))=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 6
Rw
             ...
               →DP Problem 16
Dependency Graph


Dependency Pair:

REV2(X, cons(Y0, cons(Y'', L''))) -> REV(cons(X, cons(rev1(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, rev(rev2(Y'', L'')))), rev2(rev1(Y0, rev(rev2(Y'', L''))), rev2(Y0, 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:01 minutes