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
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(f, app(app(cons, app(f, app(app(cons, nil), y))), z)) -> APP(app(app(copy, n), y), z)
APP(f, app(app(cons, app(f, app(app(cons, nil), y))), z)) -> APP(app(copy, n), y)
APP(f, app(app(cons, app(f, app(app(cons, nil), y))), z)) -> APP(copy, n)
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
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

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(app(copy, x), y)
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(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))


Strategy:

innermost




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

APP(app(app(copy, app(s, x)), y), z) -> APP(app(copy, x), y)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



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


Dependency Pairs:

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(cons, app(f, y)), z)


Rules:


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))


Strategy:

innermost




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

APP(app(app(copy, app(s, x)), y), z) -> APP(app(cons, app(f, y)), z)
one new Dependency Pair is created:

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

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:

APP(app(app(copy, app(s, x)), app(app(cons, nil), y'')), z) -> APP(app(cons, y''), z)
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(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))


Strategy:

innermost




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

APP(app(app(copy, app(s, x)), app(app(cons, nil), y'')), z) -> APP(app(cons, y''), z)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 4
Argument Filtering and Ordering


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(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))


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


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

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))


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
APP > {cons, f, app, n} > copy

resulting in one new DP problem.
Used Argument Filtering System:
APP(x1, x2) -> APP(x1, x2)
app(x1, x2) -> app(x1, x2)


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


Dependency Pair:


Rules:


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))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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