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
Polynomial Ordering
       →DP Problem 2
Polo


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 following dependency pair can be strictly oriented:

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


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(s)=  0  
  POL(APP(x1, x2))=  x2  
  POL(f)=  0  
  POL(app(x1, x2))=  1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 3
Dependency Graph
       →DP Problem 2
Polo


Dependency Pair:


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)))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polynomial Ordering


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(if, app(f, x)), app(c, app(app(g, app(s, x)), 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(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(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 following dependency pairs can be strictly oriented:

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


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

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)))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(if)=  0  
  POL(c)=  0  
  POL(0)=  1  
  POL(g)=  1  
  POL(false)=  0  
  POL(1)=  0  
  POL(true)=  0  
  POL(s)=  0  
  POL(app(x1, x2))=  x1  
  POL(f)=  0  
  POL(APP(x1, x2))=  x1  

resulting in one new DP problem.



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




The following remains to be proven:
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), 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(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)))




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