Term Rewriting System R:
[x, y]
app(f, 0) -> true
app(f, 1) -> false
app(f, app(s, x)) -> app(f, x)
app(app(app(if, true), x), y) -> x
app(app(app(if, false), x), y) -> y
app(app(g, app(s, x)), app(s, y)) -> app(app(app(if, app(f, x)), app(s, x)), app(s, y))
app(app(g, x), app(c, y)) -> app(app(g, x), app(app(g, app(s, app(c, y))), y))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(f, app(s, x)) -> APP(f, x)
APP(app(g, app(s, x)), app(s, y)) -> APP(app(app(if, app(f, x)), app(s, x)), app(s, y))
APP(app(g, app(s, x)), app(s, y)) -> APP(app(if, app(f, x)), app(s, x))
APP(app(g, app(s, x)), app(s, y)) -> APP(if, app(f, x))
APP(app(g, app(s, x)), app(s, y)) -> APP(f, x)
APP(app(g, x), app(c, y)) -> APP(app(g, x), app(app(g, app(s, app(c, y))), y))
APP(app(g, x), app(c, y)) -> APP(app(g, app(s, app(c, y))), y)
APP(app(g, x), app(c, y)) -> APP(g, app(s, app(c, y)))
APP(app(g, x), app(c, y)) -> APP(s, app(c, y))

Furthermore, R contains two SCCs.


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


Dependency Pair:

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


Rules:


app(f, 0) -> true
app(f, 1) -> false
app(f, app(s, x)) -> app(f, x)
app(app(app(if, true), x), y) -> x
app(app(app(if, false), x), y) -> y
app(app(g, app(s, x)), app(s, y)) -> app(app(app(if, app(f, x)), app(s, x)), app(s, y))
app(app(g, x), app(c, y)) -> app(app(g, x), app(app(g, app(s, app(c, y))), y))


Strategy:

innermost




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


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


Dependency Pair:

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


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
ATrans


Dependency Pair:

F(s(x)) -> F(x)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. F(s(x)) -> F(x)
and get the following Size-Change Graph(s):
{1} , {1}
1>1

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1

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
A-Transformation


Dependency Pairs:

APP(app(g, x), app(c, y)) -> APP(app(g, app(s, app(c, y))), y)
APP(app(g, x), app(c, y)) -> APP(app(g, x), app(app(g, app(s, app(c, y))), y))


Rules:


app(f, 0) -> true
app(f, 1) -> false
app(f, app(s, x)) -> app(f, x)
app(app(app(if, true), x), y) -> x
app(app(app(if, false), x), y) -> y
app(app(g, app(s, x)), app(s, y)) -> app(app(app(if, app(f, x)), app(s, x)), app(s, y))
app(app(g, x), app(c, y)) -> app(app(g, x), app(app(g, app(s, app(c, y))), 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
ATrans
           →DP Problem 5
Negative Polynomial Order


Dependency Pairs:

G(x, c(y)) -> G(s(c(y)), y)
G(x, c(y)) -> G(x, g(s(c(y)), y))


Rules:


f(0) -> true
f(1) -> false
f(s(x)) -> f(x)
if(true, x, y) -> x
if(false, x, y) -> y
g(s(x), s(y)) -> if(f(x), s(x), s(y))
g(x, c(y)) -> g(x, g(s(c(y)), y))


Strategy:

innermost




The following Dependency Pairs can be strictly oriented using the given order.

G(x, c(y)) -> G(s(c(y)), y)
G(x, c(y)) -> G(x, g(s(c(y)), y))


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

f(0) -> true
f(s(x)) -> f(x)
if(true, x, y) -> x
if(false, x, y) -> y
g(s(x), s(y)) -> if(f(x), s(x), s(y))
g(x, c(y)) -> g(x, g(s(c(y)), y))
f(1) -> false


Used ordering:
Polynomial Order with Interpretation:

POL( G(x1, x2) ) = x2

POL( c(x1) ) = x1 + 1

POL( g(x1, x2) ) = 0

POL( f(x1) ) = 0

POL( true ) = 0

POL( if(x1, ..., x3) ) = x2 + x3

POL( s(x1) ) = 0

POL( false ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
ATrans
           →DP Problem 5
Neg POLO
             ...
               →DP Problem 6
Dependency Graph


Dependency Pair:


Rules:


f(0) -> true
f(1) -> false
f(s(x)) -> f(x)
if(true, x, y) -> x
if(false, x, y) -> y
g(s(x), s(y)) -> if(f(x), s(x), s(y))
g(x, c(y)) -> g(x, g(s(c(y)), y))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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