Term Rewriting System R:
[x, y, z]
msort(nil) -> nil
msort(.(x, y)) -> .(min(x, y), msort(del(min(x, y), .(x, y))))
min(x, nil) -> x
min(x, .(y, z)) -> if(<=(x, y), min(x, z), min(y, z))
del(x, nil) -> nil
del(x, .(y, z)) -> if(=(x, y), z, .(y, del(x, z)))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

MSORT(.(x, y)) -> MIN(x, y)
MSORT(.(x, y)) -> MSORT(del(min(x, y), .(x, y)))
MSORT(.(x, y)) -> DEL(min(x, y), .(x, y))
MIN(x, .(y, z)) -> MIN(x, z)
MIN(x, .(y, z)) -> MIN(y, z)
DEL(x, .(y, z)) -> DEL(x, z)

Furthermore, R contains three SCCs.


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


Dependency Pairs:

MIN(x, .(y, z)) -> MIN(y, z)
MIN(x, .(y, z)) -> MIN(x, z)


Rules:


msort(nil) -> nil
msort(.(x, y)) -> .(min(x, y), msort(del(min(x, y), .(x, y))))
min(x, nil) -> x
min(x, .(y, z)) -> if(<=(x, y), min(x, z), min(y, z))
del(x, nil) -> nil
del(x, .(y, z)) -> if(=(x, y), z, .(y, del(x, z)))





The following dependency pairs can be strictly oriented:

MIN(x, .(y, z)) -> MIN(y, z)
MIN(x, .(y, z)) -> MIN(x, z)


The following rules can be oriented:

msort(nil) -> nil
msort(.(x, y)) -> .(min(x, y), msort(del(min(x, y), .(x, y))))
min(x, nil) -> x
min(x, .(y, z)) -> if(<=(x, y), min(x, z), min(y, z))
del(x, nil) -> nil
del(x, .(y, z)) -> if(=(x, y), z, .(y, del(x, z)))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(msort(x1))=  x1  
  POL(MIN(x1, x2))=  1 + x1 + x2  
  POL(=)=  0  
  POL(nil)=  0  
  POL(min(x1, x2))=  x1 + x2  
  POL(.(x1, x2))=  1 + x1 + x2  
  POL(del)=  0  
  POL(<=(x1, x2))=  x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
MIN(x1, x2) -> MIN(x1, x2)
.(x1, x2) -> .(x1, x2)
msort(x1) -> msort(x1)
min(x1, x2) -> min(x1, x2)
del(x1, x2) -> del
if(x1, x2, x3) -> x1
<=(x1, x2) -> <=(x1, x2)
=(x1, x2) -> =


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


Dependency Pair:


Rules:


msort(nil) -> nil
msort(.(x, y)) -> .(min(x, y), msort(del(min(x, y), .(x, y))))
min(x, nil) -> x
min(x, .(y, z)) -> if(<=(x, y), min(x, z), min(y, z))
del(x, nil) -> nil
del(x, .(y, z)) -> if(=(x, y), z, .(y, del(x, z)))





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:

DEL(x, .(y, z)) -> DEL(x, z)


Rules:


msort(nil) -> nil
msort(.(x, y)) -> .(min(x, y), msort(del(min(x, y), .(x, y))))
min(x, nil) -> x
min(x, .(y, z)) -> if(<=(x, y), min(x, z), min(y, z))
del(x, nil) -> nil
del(x, .(y, z)) -> if(=(x, y), z, .(y, del(x, z)))





The following dependency pair can be strictly oriented:

DEL(x, .(y, z)) -> DEL(x, z)


The following rules can be oriented:

msort(nil) -> nil
msort(.(x, y)) -> .(min(x, y), msort(del(min(x, y), .(x, y))))
min(x, nil) -> x
min(x, .(y, z)) -> if(<=(x, y), min(x, z), min(y, z))
del(x, nil) -> nil
del(x, .(y, z)) -> if(=(x, y), z, .(y, del(x, z)))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(DEL(x1, x2))=  1 + x1 + x2  
  POL(msort(x1))=  x1  
  POL(=)=  0  
  POL(nil)=  0  
  POL(min(x1, x2))=  x1 + x2  
  POL(.(x1, x2))=  1 + x1 + x2  
  POL(del)=  0  
  POL(<=(x1, x2))=  x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
DEL(x1, x2) -> DEL(x1, x2)
.(x1, x2) -> .(x1, x2)
msort(x1) -> msort(x1)
min(x1, x2) -> min(x1, x2)
del(x1, x2) -> del
if(x1, x2, x3) -> x1
<=(x1, x2) -> <=(x1, x2)
=(x1, x2) -> =


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


Dependency Pair:


Rules:


msort(nil) -> nil
msort(.(x, y)) -> .(min(x, y), msort(del(min(x, y), .(x, y))))
min(x, nil) -> x
min(x, .(y, z)) -> if(<=(x, y), min(x, z), min(y, z))
del(x, nil) -> nil
del(x, .(y, z)) -> if(=(x, y), z, .(y, del(x, z)))





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 Pair:

MSORT(.(x, y)) -> MSORT(del(min(x, y), .(x, y)))


Rules:


msort(nil) -> nil
msort(.(x, y)) -> .(min(x, y), msort(del(min(x, y), .(x, y))))
min(x, nil) -> x
min(x, .(y, z)) -> if(<=(x, y), min(x, z), min(y, z))
del(x, nil) -> nil
del(x, .(y, z)) -> if(=(x, y), z, .(y, del(x, z)))





The following dependency pair can be strictly oriented:

MSORT(.(x, y)) -> MSORT(del(min(x, y), .(x, y)))


The following rules can be oriented:

del(x, nil) -> nil
del(x, .(y, z)) -> if(=(x, y), z, .(y, del(x, z)))
min(x, nil) -> x
min(x, .(y, z)) -> if(<=(x, y), min(x, z), min(y, z))
msort(nil) -> nil
msort(.(x, y)) -> .(min(x, y), msort(del(min(x, y), .(x, y))))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(MSORT(x1))=  1 + x1  
  POL(msort(x1))=  x1  
  POL(=)=  0  
  POL(nil)=  0  
  POL(min(x1, x2))=  x1 + x2  
  POL(.(x1, x2))=  1 + x1 + x2  
  POL(del)=  0  
  POL(<=(x1, x2))=  x1 + x2  

resulting in one new DP problem.
Used Argument Filtering System:
MSORT(x1) -> MSORT(x1)
.(x1, x2) -> .(x1, x2)
del(x1, x2) -> del
if(x1, x2, x3) -> x1
=(x1, x2) -> =
min(x1, x2) -> min(x1, x2)
<=(x1, x2) -> <=(x1, x2)
msort(x1) -> msort(x1)


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


Dependency Pair:


Rules:


msort(nil) -> nil
msort(.(x, y)) -> .(min(x, y), msort(del(min(x, y), .(x, y))))
min(x, nil) -> x
min(x, .(y, z)) -> if(<=(x, y), min(x, z), min(y, z))
del(x, nil) -> nil
del(x, .(y, z)) -> if(=(x, y), z, .(y, del(x, z)))





Using the Dependency Graph resulted in no new DP problems.

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