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
Polynomial 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 implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(if_gcd)=  0  
  POL(0)=  0  
  POL(false)=  0  
  POL(pred)=  0  
  POL(minus)=  0  
  POL(true)=  0  
  POL(s)=  0  
  POL(le)=  0  
  POL(app(x1, x2))=  1 + x2  
  POL(APP(x1, x2))=  x2  
  POL(gcd)=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →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
Polo
       →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
Polo
       →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
Polo
       →DP Problem 2
Nar
           →DP Problem 4
Nar
             ...
               →DP Problem 5
Narrowing Transformation


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




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

APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(app(ifgcd, app(app(le, y), x)), app(s, x)), app(s, y))
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(gcd, app(s, app(s, y''))), app(s, app(s, x''))) -> APP(app(app(ifgcd, app(app(le, x''), y'')), app(s, app(s, y''))), app(s, app(s, x'')))
APP(app(gcd, app(s, 0)), app(s, app(s, x''))) -> APP(app(app(ifgcd, false), app(s, 0)), app(s, app(s, x'')))
APP(app(gcd, app(s, x')), app(s, 0)) -> APP(app(app(ifgcd, true), app(s, x')), app(s, 0))
APP(app(app(ifgcd, false), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, y), x)), app(s, 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(app(ifgcd, app(app(le, y), x)), app(s, x))
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(app(ifgcd, true), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, x), y)), app(s, 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(gcd, app(s, x)), app(s, y)) -> APP(app(ifgcd, app(app(le, y), x)), app(s, x))
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

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




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(gcd, app(app(minus, x), y)), app(s, y))
two new Dependency Pairs are created:

APP(app(app(ifgcd, true), app(s, x'')), app(s, 0)) -> APP(app(gcd, x''), app(s, 0))
APP(app(app(ifgcd, true), app(s, x'')), app(s, app(s, y''))) -> APP(app(gcd, app(pred, app(app(minus, x''), y''))), app(s, app(s, y'')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(app(ifgcd, true), app(s, x'')), app(s, app(s, y''))) -> APP(app(gcd, app(pred, app(app(minus, x''), y''))), app(s, app(s, y'')))
APP(app(app(ifgcd, true), app(s, x'')), app(s, 0)) -> APP(app(gcd, x''), app(s, 0))
APP(app(gcd, app(s, 0)), app(s, app(s, x''))) -> APP(app(ifgcd, false), app(s, 0))
APP(app(gcd, app(s, app(s, y''))), app(s, app(s, x''))) -> APP(app(app(ifgcd, app(app(le, x''), y'')), app(s, app(s, y''))), app(s, app(s, x'')))
APP(app(gcd, app(s, 0)), app(s, app(s, x''))) -> APP(app(app(ifgcd, false), app(s, 0)), app(s, app(s, x'')))
APP(app(gcd, app(s, x')), app(s, 0)) -> APP(app(ifgcd, true), app(s, x'))
APP(app(gcd, app(s, x')), app(s, 0)) -> APP(app(app(ifgcd, true), app(s, x')), app(s, 0))
APP(app(app(ifgcd, false), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, y), x)), app(s, x))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(le, y), x)
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(gcd, app(s, app(s, y''))), app(s, app(s, x''))) -> APP(app(ifgcd, app(app(le, x''), y'')), app(s, app(s, 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, false), app(s, x)), app(s, y)) -> APP(app(gcd, app(app(minus, y), x)), app(s, x))
two new Dependency Pairs are created:

APP(app(app(ifgcd, false), app(s, 0)), app(s, y')) -> APP(app(gcd, y'), app(s, 0))
APP(app(app(ifgcd, false), app(s, app(s, y''))), app(s, y0)) -> APP(app(gcd, app(pred, app(app(minus, y0), y''))), app(s, app(s, y'')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(gcd, app(s, app(s, y''))), app(s, app(s, x''))) -> APP(app(ifgcd, app(app(le, x''), y'')), app(s, app(s, y'')))
APP(app(app(ifgcd, false), app(s, app(s, y''))), app(s, y0)) -> APP(app(gcd, app(pred, app(app(minus, y0), y''))), app(s, app(s, y'')))
APP(app(app(ifgcd, false), app(s, 0)), app(s, y')) -> APP(app(gcd, y'), app(s, 0))
APP(app(app(ifgcd, true), app(s, x'')), app(s, 0)) -> APP(app(gcd, x''), app(s, 0))
APP(app(gcd, app(s, 0)), app(s, app(s, x''))) -> APP(app(ifgcd, false), app(s, 0))
APP(app(gcd, app(s, app(s, y''))), app(s, app(s, x''))) -> APP(app(app(ifgcd, app(app(le, x''), y'')), app(s, app(s, y''))), app(s, app(s, x'')))
APP(app(gcd, app(s, 0)), app(s, app(s, x''))) -> APP(app(app(ifgcd, false), app(s, 0)), app(s, app(s, x'')))
APP(app(gcd, app(s, x')), app(s, 0)) -> APP(app(ifgcd, true), app(s, x'))
APP(app(gcd, app(s, x')), app(s, 0)) -> APP(app(app(ifgcd, true), app(s, x')), app(s, 0))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(le, y), x)
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(app(ifgcd, true), app(s, x'')), app(s, app(s, y''))) -> APP(app(gcd, app(pred, app(app(minus, x''), y''))), app(s, app(s, 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(gcd, app(s, x')), app(s, 0)) -> APP(app(ifgcd, true), app(s, x'))
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(app(ifgcd, true), app(s, x'')), app(s, app(s, y''))) -> APP(app(gcd, app(pred, app(app(minus, x''), y''))), app(s, app(s, y'')))
APP(app(gcd, app(s, 0)), app(s, app(s, x''))) -> APP(app(ifgcd, false), app(s, 0))
APP(app(gcd, app(s, app(s, y''))), app(s, app(s, x''))) -> APP(app(app(ifgcd, app(app(le, x''), y'')), app(s, app(s, y''))), app(s, app(s, x'')))
APP(app(gcd, app(s, 0)), app(s, app(s, x''))) -> APP(app(app(ifgcd, false), app(s, 0)), app(s, app(s, x'')))
APP(app(app(ifgcd, false), app(s, app(s, y''))), app(s, y0)) -> APP(app(gcd, app(pred, app(app(minus, y0), y''))), app(s, app(s, y'')))
APP(app(app(ifgcd, false), app(s, 0)), app(s, y')) -> APP(app(gcd, y'), app(s, 0))
APP(app(app(ifgcd, true), app(s, x'')), app(s, 0)) -> APP(app(gcd, x''), app(s, 0))
APP(app(gcd, app(s, x')), app(s, 0)) -> APP(app(app(ifgcd, true), app(s, x')), app(s, 0))
APP(app(gcd, app(s, x)), app(s, y)) -> APP(app(le, y), x)
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(gcd, app(s, app(s, y''))), app(s, app(s, x''))) -> APP(app(ifgcd, app(app(le, x''), y'')), app(s, app(s, 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(gcd, app(s, 0)), app(s, app(s, x''))) -> APP(app(ifgcd, false), app(s, 0))
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Nar
           →DP Problem 4
Nar
             ...
               →DP Problem 11
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

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



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