Term Rewriting System R:
[x, y, u, z]
perfectp(0) -> false
perfectp(s(x)) -> f(x, s(0), s(x), s(x))
f(0, y, 0, u) -> true
f(0, y, s(z), u) -> false
f(s(x), 0, z, u) -> f(x, u, minus(z, s(x)), u)
f(s(x), s(y), z, u) -> if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

PERFECTP(s(x)) -> F(x, s(0), s(x), s(x))
F(s(x), 0, z, u) -> F(x, u, minus(z, s(x)), u)
F(s(x), s(y), z, u) -> F(s(x), minus(y, x), z, u)
F(s(x), s(y), z, u) -> F(x, u, z, u)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering


Dependency Pairs:

F(s(x), 0, z, u) -> F(x, u, minus(z, s(x)), u)
F(s(x), s(y), z, u) -> F(x, u, z, u)


Rules:


perfectp(0) -> false
perfectp(s(x)) -> f(x, s(0), s(x), s(x))
f(0, y, 0, u) -> true
f(0, y, s(z), u) -> false
f(s(x), 0, z, u) -> f(x, u, minus(z, s(x)), u)
f(s(x), s(y), z, u) -> if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u))





The following dependency pairs can be strictly oriented:

F(s(x), 0, z, u) -> F(x, u, minus(z, s(x)), u)
F(s(x), s(y), z, u) -> F(x, u, z, u)


The following rules can be oriented:

perfectp(0) -> false
perfectp(s(x)) -> f(x, s(0), s(x), s(x))
f(0, y, 0, u) -> true
f(0, y, s(z), u) -> false
f(s(x), 0, z, u) -> f(x, u, minus(z, s(x)), u)
f(s(x), s(y), z, u) -> if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  0  
  POL(false)=  0  
  POL(perfectp(x1))=  x1  
  POL(true)=  0  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.
Used Argument Filtering System:
F(x1, x2, x3, x4) -> x1
s(x1) -> s(x1)
perfectp(x1) -> perfectp(x1)
f(x1, x2, x3, x4) -> x1
if(x1, x2, x3) -> x1
le(x1, x2) -> x1


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 2
Dependency Graph


Dependency Pair:


Rules:


perfectp(0) -> false
perfectp(s(x)) -> f(x, s(0), s(x), s(x))
f(0, y, 0, u) -> true
f(0, y, s(z), u) -> false
f(s(x), 0, z, u) -> f(x, u, minus(z, s(x)), u)
f(s(x), s(y), z, u) -> if(le(x, y), f(s(x), minus(y, x), z, u), f(x, u, z, u))





Using the Dependency Graph resulted in no new DP problems.

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