Term Rewriting System R:
[x, y]
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))

Termination of R to be shown.



   R
Overlay and local confluence Check



The TRS is overlay and locally confluent (all critical pairs are trivially joinable).Hence, we can switch to innermost.


   R
OC
       →TRS2
Dependency Pair Analysis



R contains the following Dependency Pairs:

F(s(x)) -> F(x)
G(s(x), s(y)) -> IF(f(x), s(x), s(y))
G(s(x), s(y)) -> F(x)
G(x, c(y)) -> G(x, g(s(c(y)), y))
G(x, c(y)) -> G(s(c(y)), y)

Furthermore, R contains two SCCs.


   R
OC
       →TRS2
DPs
           →DP Problem 1
Usable Rules (Innermost)
           →DP Problem 2
Neg POLO


Dependency Pair:

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


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




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


   R
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
             ...
               →DP Problem 3
Size-Change Principle
           →DP Problem 2
Neg POLO


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
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
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
OC
       →TRS2
DPs
           →DP Problem 1
UsableRules
           →DP Problem 2
Neg POLO
             ...
               →DP Problem 4
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.

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