Term Rewriting System R:
[X, Y, X1, X2]
p(0) -> 0
p(s(X)) -> X
p(X) -> np(X)
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
diff(X, Y) -> if(leq(X, Y), n0, ns(ndiff(np(X), Y)))
diff(X1, X2) -> ndiff(X1, X2)
0 -> n0
s(X) -> ns(X)
activate(n0) -> 0
activate(ns(X)) -> s(activate(X))
activate(ndiff(X1, X2)) -> diff(activate(X1), activate(X2))
activate(np(X)) -> p(activate(X))
activate(X) -> X

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

LEQ(s(X), s(Y)) -> LEQ(X, Y)
IF(true, X, Y) -> ACTIVATE(X)
IF(false, X, Y) -> ACTIVATE(Y)
DIFF(X, Y) -> IF(leq(X, Y), n0, ns(ndiff(np(X), Y)))
DIFF(X, Y) -> LEQ(X, Y)
ACTIVATE(n0) -> 0'
ACTIVATE(ns(X)) -> S(activate(X))
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(ndiff(X1, X2)) -> DIFF(activate(X1), activate(X2))
ACTIVATE(ndiff(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ndiff(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(np(X)) -> P(activate(X))
ACTIVATE(np(X)) -> ACTIVATE(X)

Furthermore, R contains two SCCs.


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


Dependency Pair:

LEQ(s(X), s(Y)) -> LEQ(X, Y)


Rules:


p(0) -> 0
p(s(X)) -> X
p(X) -> np(X)
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
diff(X, Y) -> if(leq(X, Y), n0, ns(ndiff(np(X), Y)))
diff(X1, X2) -> ndiff(X1, X2)
0 -> n0
s(X) -> ns(X)
activate(n0) -> 0
activate(ns(X)) -> s(activate(X))
activate(ndiff(X1, X2)) -> diff(activate(X1), activate(X2))
activate(np(X)) -> p(activate(X))
activate(X) -> X





The following dependency pair can be strictly oriented:

LEQ(s(X), s(Y)) -> LEQ(X, Y)


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(LEQ(x1, x2))=  x1  
  POL(s(x1))=  1 + 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:


p(0) -> 0
p(s(X)) -> X
p(X) -> np(X)
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
diff(X, Y) -> if(leq(X, Y), n0, ns(ndiff(np(X), Y)))
diff(X1, X2) -> ndiff(X1, X2)
0 -> n0
s(X) -> ns(X)
activate(n0) -> 0
activate(ns(X)) -> s(activate(X))
activate(ndiff(X1, X2)) -> diff(activate(X1), activate(X2))
activate(np(X)) -> p(activate(X))
activate(X) -> X





Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pairs:

ACTIVATE(np(X)) -> ACTIVATE(X)
ACTIVATE(ndiff(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(ndiff(X1, X2)) -> ACTIVATE(X1)
IF(false, X, Y) -> ACTIVATE(Y)
DIFF(X, Y) -> IF(leq(X, Y), n0, ns(ndiff(np(X), Y)))
ACTIVATE(ndiff(X1, X2)) -> DIFF(activate(X1), activate(X2))
ACTIVATE(ns(X)) -> ACTIVATE(X)
IF(true, X, Y) -> ACTIVATE(X)


Rules:


p(0) -> 0
p(s(X)) -> X
p(X) -> np(X)
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
diff(X, Y) -> if(leq(X, Y), n0, ns(ndiff(np(X), Y)))
diff(X1, X2) -> ndiff(X1, X2)
0 -> n0
s(X) -> ns(X)
activate(n0) -> 0
activate(ns(X)) -> s(activate(X))
activate(ndiff(X1, X2)) -> diff(activate(X1), activate(X2))
activate(np(X)) -> p(activate(X))
activate(X) -> X





The following dependency pairs can be strictly oriented:

ACTIVATE(ndiff(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(ndiff(X1, X2)) -> ACTIVATE(X1)


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

activate(n0) -> 0
activate(ns(X)) -> s(activate(X))
activate(ndiff(X1, X2)) -> diff(activate(X1), activate(X2))
activate(np(X)) -> p(activate(X))
activate(X) -> X
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
diff(X, Y) -> if(leq(X, Y), n0, ns(ndiff(np(X), Y)))
diff(X1, X2) -> ndiff(X1, X2)
0 -> n0
s(X) -> ns(X)
p(0) -> 0
p(s(X)) -> X
p(X) -> np(X)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(activate(x1))=  x1  
  POL(false)=  0  
  POL(true)=  0  
  POL(n__s(x1))=  x1  
  POL(ACTIVATE(x1))=  x1  
  POL(IF(x1, x2, x3))=  x2 + x3  
  POL(DIFF(x1, x2))=  1 + x1 + x2  
  POL(if(x1, x2, x3))=  x2 + x3  
  POL(0)=  0  
  POL(n__diff(x1, x2))=  1 + x1 + x2  
  POL(leq(x1, x2))=  0  
  POL(s(x1))=  x1  
  POL(n__0)=  0  
  POL(diff(x1, x2))=  1 + x1 + x2  
  POL(p(x1))=  x1  
  POL(n__p(x1))=  x1  

resulting in one new DP problem.



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


Dependency Pairs:

ACTIVATE(np(X)) -> ACTIVATE(X)
IF(false, X, Y) -> ACTIVATE(Y)
DIFF(X, Y) -> IF(leq(X, Y), n0, ns(ndiff(np(X), Y)))
ACTIVATE(ndiff(X1, X2)) -> DIFF(activate(X1), activate(X2))
ACTIVATE(ns(X)) -> ACTIVATE(X)
IF(true, X, Y) -> ACTIVATE(X)


Rules:


p(0) -> 0
p(s(X)) -> X
p(X) -> np(X)
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
diff(X, Y) -> if(leq(X, Y), n0, ns(ndiff(np(X), Y)))
diff(X1, X2) -> ndiff(X1, X2)
0 -> n0
s(X) -> ns(X)
activate(n0) -> 0
activate(ns(X)) -> s(activate(X))
activate(ndiff(X1, X2)) -> diff(activate(X1), activate(X2))
activate(np(X)) -> p(activate(X))
activate(X) -> X





The following dependency pair can be strictly oriented:

ACTIVATE(np(X)) -> ACTIVATE(X)


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(activate(x1))=  0  
  POL(false)=  0  
  POL(true)=  0  
  POL(n__s(x1))=  x1  
  POL(ACTIVATE(x1))=  x1  
  POL(IF(x1, x2, x3))=  x2 + x3  
  POL(DIFF(x1, x2))=  0  
  POL(if(x1, x2, x3))=  0  
  POL(0)=  0  
  POL(n__diff(x1, x2))=  0  
  POL(leq(x1, x2))=  0  
  POL(s(x1))=  0  
  POL(n__0)=  0  
  POL(diff(x1, x2))=  0  
  POL(p(x1))=  0  
  POL(n__p(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 4
Polo
             ...
               →DP Problem 5
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

IF(false, X, Y) -> ACTIVATE(Y)
DIFF(X, Y) -> IF(leq(X, Y), n0, ns(ndiff(np(X), Y)))
ACTIVATE(ndiff(X1, X2)) -> DIFF(activate(X1), activate(X2))
ACTIVATE(ns(X)) -> ACTIVATE(X)
IF(true, X, Y) -> ACTIVATE(X)


Rules:


p(0) -> 0
p(s(X)) -> X
p(X) -> np(X)
leq(0, Y) -> true
leq(s(X), 0) -> false
leq(s(X), s(Y)) -> leq(X, Y)
if(true, X, Y) -> activate(X)
if(false, X, Y) -> activate(Y)
diff(X, Y) -> if(leq(X, Y), n0, ns(ndiff(np(X), Y)))
diff(X1, X2) -> ndiff(X1, X2)
0 -> n0
s(X) -> ns(X)
activate(n0) -> 0
activate(ns(X)) -> s(activate(X))
activate(ndiff(X1, X2)) -> diff(activate(X1), activate(X2))
activate(np(X)) -> p(activate(X))
activate(X) -> X




Termination of R could not be shown.
Duration:
0:18 minutes