Term Rewriting System R:
[x, y, z]
max(L(x)) -> x
max(N(L(0), L(y))) -> y
max(N(L(s(x)), L(s(y)))) -> s(max(N(L(x), L(y))))
max(N(L(x), N(y, z))) -> max(N(L(x), L(max(N(y, z)))))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

MAX(N(L(s(x)), L(s(y)))) -> MAX(N(L(x), L(y)))
MAX(N(L(x), N(y, z))) -> MAX(N(L(x), L(max(N(y, z)))))
MAX(N(L(x), N(y, z))) -> MAX(N(y, z))

Furthermore, R contains two SCCs.


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


Dependency Pair:

MAX(N(L(s(x)), L(s(y)))) -> MAX(N(L(x), L(y)))


Rules:


max(L(x)) -> x
max(N(L(0), L(y))) -> y
max(N(L(s(x)), L(s(y)))) -> s(max(N(L(x), L(y))))
max(N(L(x), N(y, z))) -> max(N(L(x), L(max(N(y, z)))))





The following dependency pair can be strictly oriented:

MAX(N(L(s(x)), L(s(y)))) -> MAX(N(L(x), L(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(MAX(x1))=  1 + x1  
  POL(L(x1))=  1 + x1  
  POL(N(x1, x2))=  1 + x1 + x2  
  POL(s(x1))=  1 + x1  

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


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


Dependency Pair:


Rules:


max(L(x)) -> x
max(N(L(0), L(y))) -> y
max(N(L(s(x)), L(s(y)))) -> s(max(N(L(x), L(y))))
max(N(L(x), N(y, z))) -> max(N(L(x), L(max(N(y, z)))))





Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pair:

MAX(N(L(x), N(y, z))) -> MAX(N(y, z))


Rules:


max(L(x)) -> x
max(N(L(0), L(y))) -> y
max(N(L(s(x)), L(s(y)))) -> s(max(N(L(x), L(y))))
max(N(L(x), N(y, z))) -> max(N(L(x), L(max(N(y, z)))))





The following dependency pair can be strictly oriented:

MAX(N(L(x), N(y, z))) -> MAX(N(y, z))


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

resulting in one new DP problem.
Used Argument Filtering System:
MAX(x1) -> MAX(x1)
N(x1, x2) -> N(x1, x2)
L(x1) -> L(x1)


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


Dependency Pair:


Rules:


max(L(x)) -> x
max(N(L(0), L(y))) -> y
max(N(L(s(x)), L(s(y)))) -> s(max(N(L(x), L(y))))
max(N(L(x), N(y, z))) -> max(N(L(x), L(max(N(y, z)))))





Using the Dependency Graph resulted in no new DP problems.

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