Term Rewriting System R:
[y, z, x]
app(f, app(app(cons, nil), y)) -> y
app(f, app(app(cons, app(f, app(app(cons, nil), y))), z)) -> app(app(app(copy, n), y), z)
app(app(app(copy, 0), y), z) -> app(f, z)
app(app(app(copy, app(s, x)), y), z) -> app(app(app(copy, x), y), app(app(cons, app(f, y)), z))

Innermost Termination of R to be shown.



   R
Removing Redundant Rules for Innermost Termination



Removing the following rules from R which left hand sides contain non normal subterms

app(f, app(app(cons, app(f, app(app(cons, nil), y))), z)) -> app(app(app(copy, n), y), z)


   R
RRRI
       →TRS2
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(app(copy, 0), y), z) -> APP(f, z)
APP(app(app(copy, app(s, x)), y), z) -> APP(app(app(copy, x), y), app(app(cons, app(f, y)), z))
APP(app(app(copy, app(s, x)), y), z) -> APP(app(copy, x), y)
APP(app(app(copy, app(s, x)), y), z) -> APP(copy, x)
APP(app(app(copy, app(s, x)), y), z) -> APP(app(cons, app(f, y)), z)
APP(app(app(copy, app(s, x)), y), z) -> APP(cons, app(f, y))
APP(app(app(copy, app(s, x)), y), z) -> APP(f, y)

Furthermore, R contains one SCC.


   R
RRRI
       →TRS2
DPs
           →DP Problem 1
Non-Overlappingness Check


Dependency Pair:

APP(app(app(copy, app(s, x)), y), z) -> APP(app(app(copy, x), y), app(app(cons, app(f, y)), z))


Rules:


app(f, app(app(cons, nil), y)) -> y
app(app(app(copy, 0), y), z) -> app(f, z)
app(app(app(copy, app(s, x)), y), z) -> app(app(app(copy, x), y), app(app(cons, app(f, y)), z))





R does not overlap into P. Moreover, R is locally confluent (all critical pairs are trivially joinable).Hence we can switch to innermost.
The transformation is resulting in one subcycle:


   R
RRRI
       →TRS2
DPs
           →DP Problem 1
NOC
             ...
               →DP Problem 2
Usable Rules (Innermost)


Dependency Pair:

APP(app(app(copy, app(s, x)), y), z) -> APP(app(app(copy, x), y), app(app(cons, app(f, y)), z))


Rules:


app(f, app(app(cons, nil), y)) -> y
app(app(app(copy, 0), y), z) -> app(f, z)
app(app(app(copy, app(s, x)), y), z) -> app(app(app(copy, x), y), app(app(cons, app(f, y)), z))


Strategy:

innermost




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


   R
RRRI
       →TRS2
DPs
           →DP Problem 1
NOC
             ...
               →DP Problem 3
A-Transformation


Dependency Pair:

APP(app(app(copy, app(s, x)), y), z) -> APP(app(app(copy, x), y), app(app(cons, app(f, y)), z))


Rule:


app(f, app(app(cons, nil), y)) -> y


Strategy:

innermost




We have an applicative DP problem with proper arity. Thus we can use the A-Transformation to obtain one new DP problem which consists of the A-transformed TRSs.


   R
RRRI
       →TRS2
DPs
           →DP Problem 1
NOC
             ...
               →DP Problem 4
Size-Change Principle


Dependency Pair:

COPY(s(x), y, z) -> COPY(x, y, cons(f(y), z))


Rule:


f(cons(nil, y)) -> y


Strategy:

innermost




We number the DPs as follows:
  1. COPY(s(x), y, z) -> COPY(x, y, cons(f(y), z))
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2=2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>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)
s(x1) -> s(x1)

We obtain no new DP problems.

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