Term Rewriting System R:
[x, y, u, z]
-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
<=(0, y) -> true
<=(s(x), 0) -> false
<=(s(x), s(y)) -> <=(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
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, -(z, s(x)), u)
f(s(x), s(y), z, u) -> if(<=(x, y), f(s(x), -(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:

-'(s(x), s(y)) -> -'(x, y)
<='(s(x), s(y)) -> <='(x, y)
PERFECTP(s(x)) -> F(x, s(0), s(x), s(x))
F(s(x), 0, z, u) -> F(x, u, -(z, s(x)), u)
F(s(x), 0, z, u) -> -'(z, s(x))
F(s(x), s(y), z, u) -> IF(<=(x, y), f(s(x), -(y, x), z, u), f(x, u, z, u))
F(s(x), s(y), z, u) -> <='(x, y)
F(s(x), s(y), z, u) -> F(s(x), -(y, x), z, u)
F(s(x), s(y), z, u) -> -'(y, x)
F(s(x), s(y), z, u) -> F(x, u, z, u)

Furthermore, R contains three SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
AFS
       →DP Problem 3
AFS


Dependency Pair:

-'(s(x), s(y)) -> -'(x, y)


Rules:


-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
<=(0, y) -> true
<=(s(x), 0) -> false
<=(s(x), s(y)) -> <=(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
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, -(z, s(x)), u)
f(s(x), s(y), z, u) -> if(<=(x, y), f(s(x), -(y, x), z, u), f(x, u, z, u))





The following dependency pair can be strictly oriented:

-'(s(x), s(y)) -> -'(x, y)


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(-'(x1, x2))=  x1 + x2  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.
Used Argument Filtering System:
-'(x1, x2) -> -'(x1, x2)
s(x1) -> s(x1)


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


Dependency Pair:


Rules:


-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
<=(0, y) -> true
<=(s(x), 0) -> false
<=(s(x), s(y)) -> <=(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
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, -(z, s(x)), u)
f(s(x), s(y), z, u) -> if(<=(x, y), f(s(x), -(y, x), z, u), f(x, u, z, u))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Argument Filtering and Ordering
       →DP Problem 3
AFS


Dependency Pair:

<='(s(x), s(y)) -> <='(x, y)


Rules:


-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
<=(0, y) -> true
<=(s(x), 0) -> false
<=(s(x), s(y)) -> <=(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
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, -(z, s(x)), u)
f(s(x), s(y), z, u) -> if(<=(x, y), f(s(x), -(y, x), z, u), f(x, u, z, u))





The following dependency pair can be strictly oriented:

<='(s(x), s(y)) -> <='(x, y)


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(s(x1))=  1 + x1  
  POL(<='(x1, x2))=  x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
<='(x1, x2) -> <='(x1, x2)
s(x1) -> s(x1)


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


Dependency Pair:


Rules:


-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
<=(0, y) -> true
<=(s(x), 0) -> false
<=(s(x), s(y)) -> <=(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
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, -(z, s(x)), u)
f(s(x), s(y), z, u) -> if(<=(x, y), f(s(x), -(y, x), z, u), f(x, u, z, u))





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Argument Filtering and Ordering


Dependency Pairs:

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


Rules:


-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
<=(0, y) -> true
<=(s(x), 0) -> false
<=(s(x), s(y)) -> <=(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
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, -(z, s(x)), u)
f(s(x), s(y), z, u) -> if(<=(x, y), f(s(x), -(y, x), z, u), f(x, u, z, u))





The following dependency pairs can be strictly oriented:

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


There are no usable rules w.r.t. to the AFS that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  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)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 6
Argument Filtering and Ordering


Dependency Pair:

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


Rules:


-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
<=(0, y) -> true
<=(s(x), 0) -> false
<=(s(x), s(y)) -> <=(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
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, -(z, s(x)), u)
f(s(x), s(y), z, u) -> if(<=(x, y), f(s(x), -(y, x), z, u), f(x, u, z, u))





The following dependency pair can be strictly oriented:

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


The following usable rules w.r.t. to the AFS can be oriented:

-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(s(x1))=  1 + x1  
  POL(F(x1, x2, x3, x4))=  x1 + x2 + x3 + x4  

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


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 6
AFS
             ...
               →DP Problem 7
Dependency Graph


Dependency Pair:


Rules:


-(x, 0) -> x
-(s(x), s(y)) -> -(x, y)
<=(0, y) -> true
<=(s(x), 0) -> false
<=(s(x), s(y)) -> <=(x, y)
if(true, x, y) -> x
if(false, x, y) -> y
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, -(z, s(x)), u)
f(s(x), s(y), z, u) -> if(<=(x, y), f(s(x), -(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