Term Rewriting System R:
[X, Y]
p(0) -> 0
p(s(X)) -> 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(diff(p(X), Y)))
0 -> n0
s(X) -> ns(X)
activate(n0) -> 0
activate(ns(X)) -> s(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(diff(p(X), Y)))
DIFF(X, Y) -> LEQ(X, Y)
DIFF(X, Y) -> DIFF(p(X), Y)
DIFF(X, Y) -> P(X)
ACTIVATE(n0) -> 0'
ACTIVATE(ns(X)) -> S(X)

Furthermore, R contains two SCCs.


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


Dependency Pair:

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


Rules:


p(0) -> 0
p(s(X)) -> 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(diff(p(X), Y)))
0 -> n0
s(X) -> ns(X)
activate(n0) -> 0
activate(ns(X)) -> s(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 using the Ce-refinement that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

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


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


Dependency Pair:


Rules:


p(0) -> 0
p(s(X)) -> 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(diff(p(X), Y)))
0 -> n0
s(X) -> ns(X)
activate(n0) -> 0
activate(ns(X)) -> s(X)
activate(X) -> X





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Remaining Obligation(s)




The following remains to be proven:
Dependency Pair:

DIFF(X, Y) -> DIFF(p(X), Y)


Rules:


p(0) -> 0
p(s(X)) -> 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(diff(p(X), Y)))
0 -> n0
s(X) -> ns(X)
activate(n0) -> 0
activate(ns(X)) -> s(X)
activate(X) -> X




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