Term Rewriting System R:
[y, x]
app(app(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(pred, app(s, x)) -> x
app(app(minus, x), 0) -> x
app(app(minus, x), app(s, y)) -> app(pred, app(app(minus, x), y))
app(app(gcd, 0), y) -> y
app(app(gcd, app(s, x)), 0) -> app(s, x)
app(app(gcd, app(s, x)), app(s, y)) -> app(app(app(ifgcd, app(app(le, y), x)), app(s, x)), app(s, y))
app(app(app(ifgcd, true), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, x), y)), app(s, y))
app(app(app(ifgcd, false), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, y), x)), app(s, x))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(le, app(s, x)), app(s, y)) -> APP(le, x)
APP(app(minus, x), app(s, y)) -> APP(pred, app(app(minus, x), y))
APP(app(minus, x), app(s, y)) -> APP(app(minus, x), y)
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(app(ifgcd, app(app(le, y), x)), app(s, x)), app(s, y))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(ifgcd, app(app(le, y), x)), app(s, x))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(ifgcd, app(app(le, y), x))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(le, y), x)
APP(app(gcd, app(s, x)), app(s, y)) -> APP(le, y)
APP(app(app(ifgcd, true), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, x), y)), app(s, y))
APP(app(app(ifgcd, true), app(s, x)), app(s, y)) -> APP(gcd, app(app(minus, x), y))
APP(app(app(ifgcd, true), app(s, x)), app(s, y)) -> APP(app(minus, x), y)
APP(app(app(ifgcd, true), app(s, x)), app(s, y)) -> APP(minus, x)
APP(app(app(ifgcd, false), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, y), x)), app(s, x))
APP(app(app(ifgcd, false), app(s, x)), app(s, y)) -> APP(gcd, app(app(minus, y), x))
APP(app(app(ifgcd, false), app(s, x)), app(s, y)) -> APP(app(minus, y), x)
APP(app(app(ifgcd, false), app(s, x)), app(s, y)) -> APP(minus, y)

Furthermore, R contains two SCCs.


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


Dependency Pair:

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


Rules:


app(app(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(pred, app(s, x)) -> x
app(app(minus, x), 0) -> x
app(app(minus, x), app(s, y)) -> app(pred, app(app(minus, x), y))
app(app(gcd, 0), y) -> y
app(app(gcd, app(s, x)), 0) -> app(s, x)
app(app(gcd, app(s, x)), app(s, y)) -> app(app(app(ifgcd, app(app(le, y), x)), app(s, x)), app(s, y))
app(app(app(ifgcd, true), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, x), y)), app(s, y))
app(app(app(ifgcd, false), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, y), x)), app(s, x))


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
APP(x1, x2) -> 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(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(pred, app(s, x)) -> x
app(app(minus, x), 0) -> x
app(app(minus, x), app(s, y)) -> app(pred, app(app(minus, x), y))
app(app(gcd, 0), y) -> y
app(app(gcd, app(s, x)), 0) -> app(s, x)
app(app(gcd, app(s, x)), app(s, y)) -> app(app(app(ifgcd, app(app(le, y), x)), app(s, x)), app(s, y))
app(app(app(ifgcd, true), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, x), y)), app(s, y))
app(app(app(ifgcd, false), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, y), x)), app(s, x))


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(app(ifgcd, false), app(s, x)), app(s, y)) -> APP(app(minus, y), x)
APP(app(app(ifgcd, false), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, y), x)), app(s, x))
APP(app(app(ifgcd, true), app(s, x)), app(s, y)) -> APP(app(minus, x), y)
APP(app(app(ifgcd, true), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, x), y)), app(s, y))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(le, y), x)
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(ifgcd, app(app(le, y), x)), app(s, x))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(app(ifgcd, app(app(le, y), x)), app(s, x)), app(s, y))
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)


Rules:


app(app(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(pred, app(s, x)) -> x
app(app(minus, x), 0) -> x
app(app(minus, x), app(s, y)) -> app(pred, app(app(minus, x), y))
app(app(gcd, 0), y) -> y
app(app(gcd, app(s, x)), 0) -> app(s, x)
app(app(gcd, app(s, x)), app(s, y)) -> app(app(app(ifgcd, app(app(le, y), x)), app(s, x)), app(s, y))
app(app(app(ifgcd, true), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, x), y)), app(s, y))
app(app(app(ifgcd, false), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, y), x)), app(s, x))


Strategy:

innermost




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

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



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


Dependency Pairs:

APP(app(app(ifgcd, false), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, y), x)), app(s, x))
APP(app(app(ifgcd, true), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, x), y)), app(s, y))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(le, y), x)
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(ifgcd, app(app(le, y), x)), app(s, x))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(app(ifgcd, app(app(le, y), x)), app(s, x)), app(s, y))
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(app(ifgcd, false), app(s, x)), app(s, y)) -> APP(app(minus, y), x)


Rules:


app(app(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(pred, app(s, x)) -> x
app(app(minus, x), 0) -> x
app(app(minus, x), app(s, y)) -> app(pred, app(app(minus, x), y))
app(app(gcd, 0), y) -> y
app(app(gcd, app(s, x)), 0) -> app(s, x)
app(app(gcd, app(s, x)), app(s, y)) -> app(app(app(ifgcd, app(app(le, y), x)), app(s, x)), app(s, y))
app(app(app(ifgcd, true), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, x), y)), app(s, y))
app(app(app(ifgcd, false), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, y), x)), app(s, x))


Strategy:

innermost




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

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



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




The following remains to be proven:
Dependency Pairs:

APP(app(app(ifgcd, true), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, x), y)), app(s, y))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(le, y), x)
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(ifgcd, app(app(le, y), x)), app(s, x))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(app(ifgcd, app(app(le, y), x)), app(s, x)), app(s, y))
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(app(ifgcd, false), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, y), x)), app(s, x))


Rules:


app(app(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(pred, app(s, x)) -> x
app(app(minus, x), 0) -> x
app(app(minus, x), app(s, y)) -> app(pred, app(app(minus, x), y))
app(app(gcd, 0), y) -> y
app(app(gcd, app(s, x)), 0) -> app(s, x)
app(app(gcd, app(s, x)), app(s, y)) -> app(app(app(ifgcd, app(app(le, y), x)), app(s, x)), app(s, y))
app(app(app(ifgcd, true), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, x), y)), app(s, y))
app(app(app(ifgcd, false), app(s, x)), app(s, y)) -> app(app(gcd, app(app(minus, y), x)), app(s, x))


Strategy:

innermost



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