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
Argument Filtering and Ordering
       →DP Problem 2
AFS


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)


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))=  x1 + x2  
  POL(nil)=  0  
  POL(.(x1, x2))=  1 + x1 + x2  
  POL(purge(x1))=  x1  

resulting in one new DP problem.
Used Argument Filtering System:
REMOVE(x1, x2) -> REMOVE(x1, x2)
.(x1, x2) -> .(x1, x2)
purge(x1) -> purge(x1)
remove(x1, x2) -> x2
if(x1, x2, x3) -> x1
=(x1, x2) -> x2


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


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
AFS
       →DP Problem 2
Argument Filtering and 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))


The following rules can be oriented:

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


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

resulting in one new DP problem.
Used Argument Filtering System:
PURGE(x1) -> PURGE(x1)
.(x1, x2) -> .(x1, x2)
remove(x1, x2) -> x2
if(x1, x2, x3) -> x1
=(x1, x2) -> x2
purge(x1) -> purge(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →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