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

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

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

Furthermore, R contains two SCCs.


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


Dependency Pair:

APP(double, app(s, x)) -> APP(double, x)


Rules:


app(app(minus, x), 0) -> x
app(app(minus, app(s, x)), app(s, y)) -> app(app(minus, x), y)
app(double, 0) -> 0
app(double, app(s, x)) -> app(s, app(s, app(double, x)))
app(app(plus, 0), y) -> y
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y))
app(app(plus, app(s, x)), y) -> app(app(plus, x), app(s, y))
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, app(app(minus, x), y)), app(double, y)))


Strategy:

innermost




The following dependency pair can be strictly oriented:

APP(double, app(s, x)) -> APP(double, x)


There are no usable rules for innermost that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
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
AFS
           →DP Problem 3
Dependency Graph
       →DP Problem 2
Nar


Dependency Pair:


Rules:


app(app(minus, x), 0) -> x
app(app(minus, app(s, x)), app(s, y)) -> app(app(minus, x), y)
app(double, 0) -> 0
app(double, app(s, x)) -> app(s, app(s, app(double, x)))
app(app(plus, 0), y) -> y
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y))
app(app(plus, app(s, x)), y) -> app(app(plus, x), app(s, y))
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, app(app(minus, x), y)), app(double, y)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pairs:

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


Rules:


app(app(minus, x), 0) -> x
app(app(minus, app(s, x)), app(s, y)) -> app(app(minus, x), y)
app(double, 0) -> 0
app(double, app(s, x)) -> app(s, app(s, app(double, x)))
app(app(plus, 0), y) -> y
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y))
app(app(plus, app(s, x)), y) -> app(app(plus, x), app(s, y))
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, app(app(minus, x), y)), app(double, y)))


Strategy:

innermost




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

APP(app(plus, app(s, x)), y) -> APP(app(plus, app(app(minus, x), y)), app(double, y))
four new Dependency Pairs are created:

APP(app(plus, app(s, x'')), 0) -> APP(app(plus, x''), app(double, 0))
APP(app(plus, app(s, app(s, x''))), app(s, y'')) -> APP(app(plus, app(app(minus, x''), y'')), app(double, app(s, y'')))
APP(app(plus, app(s, x)), 0) -> APP(app(plus, app(app(minus, x), 0)), 0)
APP(app(plus, app(s, x)), app(s, x'')) -> APP(app(plus, app(app(minus, x), app(s, x''))), app(s, app(s, app(double, x''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Nar
           →DP Problem 4
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

APP(app(plus, app(s, x)), app(s, x'')) -> APP(app(plus, app(app(minus, x), app(s, x''))), app(s, app(s, app(double, x''))))
APP(app(plus, app(s, x)), 0) -> APP(app(plus, app(app(minus, x), 0)), 0)
APP(app(plus, app(s, app(s, x''))), app(s, y'')) -> APP(app(plus, app(app(minus, x''), y'')), app(double, app(s, y'')))
APP(app(plus, app(s, x'')), 0) -> APP(app(plus, x''), app(double, 0))
APP(app(plus, app(s, x)), y) -> APP(app(plus, x), app(s, y))
APP(app(plus, app(s, x)), y) -> APP(app(plus, x), y)
APP(app(minus, app(s, x)), app(s, y)) -> APP(app(minus, x), y)
APP(app(plus, app(s, x)), y) -> APP(app(minus, x), y)


Rules:


app(app(minus, x), 0) -> x
app(app(minus, app(s, x)), app(s, y)) -> app(app(minus, x), y)
app(double, 0) -> 0
app(double, app(s, x)) -> app(s, app(s, app(double, x)))
app(app(plus, 0), y) -> y
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, x), y))
app(app(plus, app(s, x)), y) -> app(app(plus, x), app(s, y))
app(app(plus, app(s, x)), y) -> app(s, app(app(plus, app(app(minus, x), y)), app(double, y)))


Strategy:

innermost



Innermost Termination of R could not be shown.
Duration:
0:02 minutes