Term Rewriting System R:
[x, y, z]
purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

PURGE(.(x, y)) -> PURGE(remove(x, y))
PURGE(.(x, y)) -> REMOVE(x, y)
REMOVE(x, .(y, z)) -> REMOVE(x, z)

Furthermore, R contains two SCCs.


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


Dependency Pair:

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


Rules:


purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))





The following dependency pair can be strictly oriented:

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


Additionally, the following rules can be oriented:

purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(remove(x1, x2))=  0  
  POL(REMOVE(x1, x2))=  1 + x2  
  POL(if(x1, x2, x3))=  0  
  POL(=(x1, x2))=  0  
  POL(nil)=  0  
  POL(.(x1, x2))=  1 + x2  
  POL(purge(x1))=  x1  

resulting in one new DP problem.



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


Dependency Pair:


Rules:


purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))





Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pair:

PURGE(.(x, y)) -> PURGE(remove(x, y))


Rules:


purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))





The following dependency pair can be strictly oriented:

PURGE(.(x, y)) -> PURGE(remove(x, y))


Additionally, the following rules can be oriented:

purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(remove(x1, x2))=  0  
  POL(if(x1, x2, x3))=  0  
  POL(PURGE(x1))=  x1  
  POL(=(x1, x2))=  0  
  POL(nil)=  0  
  POL(.(x1, x2))=  1  
  POL(purge(x1))=  1  

resulting in one new DP problem.



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


Dependency Pair:


Rules:


purge(nil) -> nil
purge(.(x, y)) -> .(x, purge(remove(x, y)))
remove(x, nil) -> nil
remove(x, .(y, z)) -> if(=(x, y), remove(x, z), .(y, remove(x, z)))





Using the Dependency Graph resulted in no new DP problems.

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