Term Rewriting System R:
[y, x]
app(app(ack, 0), y) -> app(succ, y)
app(app(ack, app(succ, x)), y) -> app(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), app(succ, y)) -> app(app(ack, x), app(app(ack, app(succ, x)), y))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(ack, 0), y) -> APP(succ, y)
APP(app(ack, app(succ, x)), y) -> APP(app(ack, x), app(succ, 0))
APP(app(ack, app(succ, x)), y) -> APP(ack, x)
APP(app(ack, app(succ, x)), y) -> APP(succ, 0)
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, x), app(app(ack, app(succ, x)), y))
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(ack, x)
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, app(succ, x)), y)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, app(succ, x)), y)
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, x), app(app(ack, app(succ, x)), y))
APP(app(ack, app(succ, x)), y) -> APP(app(ack, x), app(succ, 0))


Rules:


app(app(ack, 0), y) -> app(succ, y)
app(app(ack, app(succ, x)), y) -> app(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), app(succ, y)) -> app(app(ack, x), app(app(ack, app(succ, x)), y))


Strategy:

innermost




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

APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, x), app(app(ack, app(succ, x)), y))
two new Dependency Pairs are created:

APP(app(ack, app(succ, x'')), app(succ, y'')) -> APP(app(ack, x''), app(app(ack, x''), app(succ, 0)))
APP(app(ack, app(succ, x'')), app(succ, app(succ, y''))) -> APP(app(ack, x''), app(app(ack, x''), app(app(ack, app(succ, x'')), y'')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(ack, app(succ, x'')), app(succ, app(succ, y''))) -> APP(app(ack, x''), app(app(ack, x''), app(app(ack, app(succ, x'')), y'')))
APP(app(ack, app(succ, x'')), app(succ, y'')) -> APP(app(ack, x''), app(app(ack, x''), app(succ, 0)))
APP(app(ack, app(succ, x)), y) -> APP(app(ack, x), app(succ, 0))
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, app(succ, x)), y)


Rules:


app(app(ack, 0), y) -> app(succ, y)
app(app(ack, app(succ, x)), y) -> app(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), app(succ, y)) -> app(app(ack, x), app(app(ack, app(succ, x)), y))


Strategy:

innermost




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

APP(app(ack, app(succ, x'')), app(succ, y'')) -> APP(app(ack, x''), app(app(ack, x''), app(succ, 0)))
three new Dependency Pairs are created:

APP(app(ack, app(succ, 0)), app(succ, y'')) -> APP(app(ack, 0), app(succ, app(succ, 0)))
APP(app(ack, app(succ, app(succ, x'))), app(succ, y'')) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(succ, 0)))
APP(app(ack, app(succ, app(succ, x'))), app(succ, y'')) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(app(ack, app(succ, x')), 0)))

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(ack, app(succ, app(succ, x'))), app(succ, y'')) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(app(ack, app(succ, x')), 0)))
APP(app(ack, app(succ, app(succ, x'))), app(succ, y'')) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(succ, 0)))
APP(app(ack, app(succ, 0)), app(succ, y'')) -> APP(app(ack, 0), app(succ, app(succ, 0)))
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, app(succ, x)), y)
APP(app(ack, app(succ, x)), y) -> APP(app(ack, x), app(succ, 0))
APP(app(ack, app(succ, x'')), app(succ, app(succ, y''))) -> APP(app(ack, x''), app(app(ack, x''), app(app(ack, app(succ, x'')), y'')))


Rules:


app(app(ack, 0), y) -> app(succ, y)
app(app(ack, app(succ, x)), y) -> app(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), app(succ, y)) -> app(app(ack, x), app(app(ack, app(succ, x)), y))


Strategy:

innermost




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

APP(app(ack, app(succ, x'')), app(succ, app(succ, y''))) -> APP(app(ack, x''), app(app(ack, x''), app(app(ack, app(succ, x'')), y'')))
four new Dependency Pairs are created:

APP(app(ack, app(succ, 0)), app(succ, app(succ, y'''))) -> APP(app(ack, 0), app(succ, app(app(ack, app(succ, 0)), y''')))
APP(app(ack, app(succ, app(succ, x'))), app(succ, app(succ, y'''))) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(succ, 0)))
APP(app(ack, app(succ, x''')), app(succ, app(succ, y'''))) -> APP(app(ack, x'''), app(app(ack, x'''), app(app(ack, x'''), app(succ, 0))))
APP(app(ack, app(succ, x''')), app(succ, app(succ, app(succ, y')))) -> APP(app(ack, x'''), app(app(ack, x'''), app(app(ack, x'''), app(app(ack, app(succ, x''')), y'))))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(ack, app(succ, x''')), app(succ, app(succ, app(succ, y')))) -> APP(app(ack, x'''), app(app(ack, x'''), app(app(ack, x'''), app(app(ack, app(succ, x''')), y'))))
APP(app(ack, app(succ, x''')), app(succ, app(succ, y'''))) -> APP(app(ack, x'''), app(app(ack, x'''), app(app(ack, x'''), app(succ, 0))))
APP(app(ack, app(succ, app(succ, x'))), app(succ, app(succ, y'''))) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(succ, 0)))
APP(app(ack, app(succ, 0)), app(succ, app(succ, y'''))) -> APP(app(ack, 0), app(succ, app(app(ack, app(succ, 0)), y''')))
APP(app(ack, app(succ, app(succ, x'))), app(succ, y'')) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(succ, 0)))
APP(app(ack, app(succ, 0)), app(succ, y'')) -> APP(app(ack, 0), app(succ, app(succ, 0)))
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, app(succ, x)), y)
APP(app(ack, app(succ, x)), y) -> APP(app(ack, x), app(succ, 0))
APP(app(ack, app(succ, app(succ, x'))), app(succ, y'')) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(app(ack, app(succ, x')), 0)))


Rules:


app(app(ack, 0), y) -> app(succ, y)
app(app(ack, app(succ, x)), y) -> app(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), app(succ, y)) -> app(app(ack, x), app(app(ack, app(succ, x)), y))


Strategy:

innermost




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

APP(app(ack, app(succ, 0)), app(succ, y'')) -> APP(app(ack, 0), app(succ, app(succ, 0)))
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 5
Argument Filtering and Ordering


Dependency Pairs:

APP(app(ack, app(succ, x''')), app(succ, app(succ, y'''))) -> APP(app(ack, x'''), app(app(ack, x'''), app(app(ack, x'''), app(succ, 0))))
APP(app(ack, app(succ, app(succ, x'))), app(succ, app(succ, y'''))) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(succ, 0)))
APP(app(ack, app(succ, 0)), app(succ, app(succ, y'''))) -> APP(app(ack, 0), app(succ, app(app(ack, app(succ, 0)), y''')))
APP(app(ack, app(succ, app(succ, x'))), app(succ, y'')) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(app(ack, app(succ, x')), 0)))
APP(app(ack, app(succ, app(succ, x'))), app(succ, y'')) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(succ, 0)))
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, app(succ, x)), y)
APP(app(ack, app(succ, x)), y) -> APP(app(ack, x), app(succ, 0))
APP(app(ack, app(succ, x''')), app(succ, app(succ, app(succ, y')))) -> APP(app(ack, x'''), app(app(ack, x'''), app(app(ack, x'''), app(app(ack, app(succ, x''')), y'))))


Rules:


app(app(ack, 0), y) -> app(succ, y)
app(app(ack, app(succ, x)), y) -> app(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), app(succ, y)) -> app(app(ack, x), app(app(ack, app(succ, x)), y))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

APP(app(ack, app(succ, x''')), app(succ, app(succ, y'''))) -> APP(app(ack, x'''), app(app(ack, x'''), app(app(ack, x'''), app(succ, 0))))
APP(app(ack, app(succ, app(succ, x'))), app(succ, app(succ, y'''))) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(succ, 0)))
APP(app(ack, app(succ, 0)), app(succ, app(succ, y'''))) -> APP(app(ack, 0), app(succ, app(app(ack, app(succ, 0)), y''')))
APP(app(ack, app(succ, app(succ, x'))), app(succ, y'')) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(app(ack, app(succ, x')), 0)))
APP(app(ack, app(succ, app(succ, x'))), app(succ, y'')) -> APP(app(ack, app(succ, x')), app(app(ack, x'), app(succ, 0)))
APP(app(ack, app(succ, x)), app(succ, y)) -> APP(app(ack, app(succ, x)), y)
APP(app(ack, app(succ, x)), y) -> APP(app(ack, x), app(succ, 0))
APP(app(ack, app(succ, x''')), app(succ, app(succ, app(succ, y')))) -> APP(app(ack, x'''), app(app(ack, x'''), app(app(ack, x'''), app(app(ack, app(succ, x''')), y'))))


The following usable rules for innermost can be oriented:

app(app(ack, 0), y) -> app(succ, y)
app(app(ack, app(succ, x)), y) -> app(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), app(succ, y)) -> app(app(ack, x), app(app(ack, app(succ, x)), y))


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
{app, 0, APP} > succ

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 6
Dependency Graph


Dependency Pair:


Rules:


app(app(ack, 0), y) -> app(succ, y)
app(app(ack, app(succ, x)), y) -> app(app(ack, x), app(succ, 0))
app(app(ack, app(succ, x)), app(succ, y)) -> app(app(ack, x), app(app(ack, app(succ, x)), y))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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