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), app(s, x)), app(s, y)) -> app(s, x)
app(app(app(if, false), app(s, x)), app(s, y)) -> app(s, y)
app(app(g, x), app(c, y)) -> app(c, app(app(g, x), y))
app(app(g, x), app(c, y)) -> app(app(g, x), app(app(app(if, app(f, x)), app(c, app(app(g, app(s, x)), y))), app(c, y)))

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, x), app(c, y)) -> APP(c, app(app(g, x), y))
APP(app(g, x), app(c, y)) -> APP(app(g, x), y)
APP(app(g, x), app(c, y)) -> APP(app(g, x), app(app(app(if, app(f, x)), app(c, app(app(g, app(s, x)), y))), app(c, y)))
APP(app(g, x), app(c, y)) -> APP(app(app(if, app(f, x)), app(c, app(app(g, app(s, x)), y))), app(c, y))
APP(app(g, x), app(c, y)) -> APP(app(if, app(f, x)), app(c, app(app(g, app(s, x)), y)))
APP(app(g, x), app(c, y)) -> APP(if, app(f, x))
APP(app(g, x), app(c, y)) -> APP(f, x)
APP(app(g, x), app(c, y)) -> APP(c, app(app(g, app(s, x)), y))
APP(app(g, x), app(c, y)) -> APP(app(g, app(s, x)), y)
APP(app(g, x), app(c, y)) -> APP(g, app(s, x))
APP(app(g, x), app(c, y)) -> APP(s, x)

Furthermore, R contains two SCCs.


   R
DPs
       →DP Problem 1
Size-Change Principle
       →DP Problem 2
SCP


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), app(s, x)), app(s, y)) -> app(s, x)
app(app(app(if, false), app(s, x)), app(s, y)) -> app(s, y)
app(app(g, x), app(c, y)) -> app(c, app(app(g, x), y))
app(app(g, x), app(c, y)) -> app(app(g, x), app(app(app(if, app(f, x)), app(c, app(app(g, app(s, x)), y))), app(c, y)))





The original DP problem is in applicative form. Its DPs and usable rules are the following.

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

none


It is proper and hence, it can be A-transformed which results in the DP problem

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

none


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
SCP
       →DP Problem 2
Size-Change Principle


Dependency Pairs:

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


Rules:


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





The original DP problem is in applicative form. Its DPs and usable rules are the following.

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

none


It is proper and hence, it can be A-transformed which results in the DP problem

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

none


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

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

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
c(x1) -> c(x1)
s(x1) -> s(x1)

We obtain no new DP problems.

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