Term Rewriting System R:
[x, y]
app(app(plus, x), 0) -> x
app(app(plus, x), app(s, y)) -> app(s, app(app(plus, x), y))
app(app(app(f, 0), app(s, 0)), x) -> app(app(app(f, x), app(app(plus, x), x)), x)
app(app(g, x), y) -> x
app(app(g, x), y) -> y

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(plus, x), app(s, y)) -> APP(s, app(app(plus, x), y))
APP(app(plus, x), app(s, y)) -> APP(app(plus, x), y)
APP(app(app(f, 0), app(s, 0)), x) -> APP(app(app(f, x), app(app(plus, x), x)), x)
APP(app(app(f, 0), app(s, 0)), x) -> APP(app(f, x), app(app(plus, x), x))
APP(app(app(f, 0), app(s, 0)), x) -> APP(f, x)
APP(app(app(f, 0), app(s, 0)), x) -> APP(app(plus, x), x)
APP(app(app(f, 0), app(s, 0)), x) -> APP(plus, x)

Furthermore, R contains two SCCs.


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


Dependency Pair:

APP(app(plus, x), app(s, y)) -> APP(app(plus, x), y)


Rules:


app(app(plus, x), 0) -> x
app(app(plus, x), app(s, y)) -> app(s, app(app(plus, x), y))
app(app(app(f, 0), app(s, 0)), x) -> app(app(app(f, x), app(app(plus, x), x)), x)
app(app(g, x), y) -> x
app(app(g, x), y) -> y


Strategy:

innermost




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


   R
DPs
       →DP Problem 1
UsableRules
           →DP Problem 3
A-Transformation
       →DP Problem 2
UsableRules


Dependency Pair:

APP(app(plus, x), app(s, y)) -> APP(app(plus, x), y)


Rule:

none


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
DPs
       →DP Problem 1
UsableRules
           →DP Problem 3
ATrans
             ...
               →DP Problem 4
Size-Change Principle
       →DP Problem 2
UsableRules


Dependency Pair:

PLUS(x, s(y)) -> PLUS(x, y)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. PLUS(x, s(y)) -> PLUS(x, y)
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:
s(x1) -> s(x1)

We obtain no new DP problems.


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


Dependency Pair:

APP(app(app(f, 0), app(s, 0)), x) -> APP(app(app(f, x), app(app(plus, x), x)), x)


Rules:


app(app(plus, x), 0) -> x
app(app(plus, x), app(s, y)) -> app(s, app(app(plus, x), y))
app(app(app(f, 0), app(s, 0)), x) -> app(app(app(f, x), app(app(plus, x), x)), x)
app(app(g, x), y) -> x
app(app(g, x), y) -> y


Strategy:

innermost




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


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
           →DP Problem 5
A-Transformation


Dependency Pair:

APP(app(app(f, 0), app(s, 0)), x) -> APP(app(app(f, x), app(app(plus, x), x)), x)


Rules:


app(app(plus, x), 0) -> x
app(app(plus, x), app(s, y)) -> app(s, app(app(plus, x), 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
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
           →DP Problem 5
ATrans
             ...
               →DP Problem 6
Narrowing Transformation


Dependency Pair:

F(0, s(0), x) -> F(x, plus(x, x), x)


Rules:


plus(x, 0) -> x
plus(x, s(y)) -> s(plus(x, y))


Strategy:

innermost




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

F(0, s(0), x) -> F(x, plus(x, x), x)
two new Dependency Pairs are created:

F(0, s(0), 0) -> F(0, 0, 0)
F(0, s(0), s(y')) -> F(s(y'), s(plus(s(y'), y')), s(y'))

The transformation is resulting in no new DP problems.


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