Term Rewriting System R:
[X, XS, N, Y, YS, X1, X2]
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
minus(X, 0) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
quot(0, s(Y)) -> 0
quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y)))
zWquot(XS, nil) -> nil
zWquot(nil, XS) -> nil
zWquot(cons(X, XS), cons(Y, YS)) -> cons(quot(X, Y), nzWquot(activate(XS), activate(YS)))
zWquot(X1, X2) -> nzWquot(X1, X2)
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nzWquot(X1, X2)) -> zWquot(activate(X1), activate(X2))
activate(X) -> X

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS))
SEL(s(N), cons(X, XS)) -> ACTIVATE(XS)
MINUS(s(X), s(Y)) -> MINUS(X, Y)
QUOT(s(X), s(Y)) -> S(quot(minus(X, Y), s(Y)))
QUOT(s(X), s(Y)) -> QUOT(minus(X, Y), s(Y))
QUOT(s(X), s(Y)) -> MINUS(X, Y)
ZWQUOT(cons(X, XS), cons(Y, YS)) -> QUOT(X, Y)
ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(XS)
ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(YS)
ACTIVATE(nfrom(X)) -> FROM(activate(X))
ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(ns(X)) -> S(activate(X))
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nzWquot(X1, X2)) -> ZWQUOT(activate(X1), activate(X2))
ACTIVATE(nzWquot(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nzWquot(X1, X2)) -> ACTIVATE(X2)

Furthermore, R contains four SCCs.


   R
DPs
       →DP Problem 1
Size-Change Principle
       →DP Problem 2
Neg POLO
       →DP Problem 3
Neg POLO
       →DP Problem 4
SCP


Dependency Pair:

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


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
minus(X, 0) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
quot(0, s(Y)) -> 0
quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y)))
zWquot(XS, nil) -> nil
zWquot(nil, XS) -> nil
zWquot(cons(X, XS), cons(Y, YS)) -> cons(quot(X, Y), nzWquot(activate(XS), activate(YS)))
zWquot(X1, X2) -> nzWquot(X1, X2)
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nzWquot(X1, X2)) -> zWquot(activate(X1), activate(X2))
activate(X) -> X





We number the DPs as follows:
  1. MINUS(s(X), s(Y)) -> MINUS(X, Y)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
s(x1) -> s(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
Negative Polynomial Order
       →DP Problem 3
Neg POLO
       →DP Problem 4
SCP


Dependency Pair:

QUOT(s(X), s(Y)) -> QUOT(minus(X, Y), s(Y))


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
minus(X, 0) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
quot(0, s(Y)) -> 0
quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y)))
zWquot(XS, nil) -> nil
zWquot(nil, XS) -> nil
zWquot(cons(X, XS), cons(Y, YS)) -> cons(quot(X, Y), nzWquot(activate(XS), activate(YS)))
zWquot(X1, X2) -> nzWquot(X1, X2)
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nzWquot(X1, X2)) -> zWquot(activate(X1), activate(X2))
activate(X) -> X





The following Dependency Pair can be strictly oriented using the given order.

QUOT(s(X), s(Y)) -> QUOT(minus(X, Y), s(Y))


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

minus(X, 0) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
s(X) -> ns(X)


Used ordering:
Polynomial Order with Interpretation:

POL( QUOT(x1, x2) ) = x1

POL( s(x1) ) = 1

POL( minus(x1, x2) ) = 0

POL( 0 ) = 0

POL( ns(x1) ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
Neg POLO
           →DP Problem 5
Dependency Graph
       →DP Problem 3
Neg POLO
       →DP Problem 4
SCP


Dependency Pair:


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
minus(X, 0) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
quot(0, s(Y)) -> 0
quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y)))
zWquot(XS, nil) -> nil
zWquot(nil, XS) -> nil
zWquot(cons(X, XS), cons(Y, YS)) -> cons(quot(X, Y), nzWquot(activate(XS), activate(YS)))
zWquot(X1, X2) -> nzWquot(X1, X2)
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nzWquot(X1, X2)) -> zWquot(activate(X1), activate(X2))
activate(X) -> X





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
Neg POLO
       →DP Problem 3
Negative Polynomial Order
       →DP Problem 4
SCP


Dependency Pairs:

ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(YS)
ACTIVATE(nzWquot(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nzWquot(X1, X2)) -> ACTIVATE(X1)
ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(XS)
ACTIVATE(nzWquot(X1, X2)) -> ZWQUOT(activate(X1), activate(X2))
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
minus(X, 0) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
quot(0, s(Y)) -> 0
quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y)))
zWquot(XS, nil) -> nil
zWquot(nil, XS) -> nil
zWquot(cons(X, XS), cons(Y, YS)) -> cons(quot(X, Y), nzWquot(activate(XS), activate(YS)))
zWquot(X1, X2) -> nzWquot(X1, X2)
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nzWquot(X1, X2)) -> zWquot(activate(X1), activate(X2))
activate(X) -> X





The following Dependency Pairs can be strictly oriented using the given order.

ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(YS)
ACTIVATE(nzWquot(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nzWquot(X1, X2)) -> ACTIVATE(X1)
ZWQUOT(cons(X, XS), cons(Y, YS)) -> ACTIVATE(XS)


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nzWquot(X1, X2)) -> zWquot(activate(X1), activate(X2))
activate(X) -> X
from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
s(X) -> ns(X)
zWquot(XS, nil) -> nil
zWquot(nil, XS) -> nil
zWquot(cons(X, XS), cons(Y, YS)) -> cons(quot(X, Y), nzWquot(activate(XS), activate(YS)))
zWquot(X1, X2) -> nzWquot(X1, X2)
quot(0, s(Y)) -> 0
quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y)))
minus(X, 0) -> 0
minus(s(X), s(Y)) -> minus(X, Y)


Used ordering:
Polynomial Order with Interpretation:

POL( ZWQUOT(x1, x2) ) = x1 + x2 + 1

POL( cons(x1, x2) ) = x2

POL( ACTIVATE(x1) ) = x1

POL( nzWquot(x1, x2) ) = x1 + x2 + 1

POL( ns(x1) ) = x1

POL( nfrom(x1) ) = x1

POL( activate(x1) ) = x1

POL( from(x1) ) = x1

POL( s(x1) ) = x1

POL( zWquot(x1, x2) ) = x1 + x2 + 1

POL( nil ) = 0

POL( quot(x1, x2) ) = 0

POL( 0 ) = 0

POL( minus(x1, x2) ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
Neg POLO
       →DP Problem 3
Neg POLO
           →DP Problem 6
Dependency Graph
       →DP Problem 4
SCP


Dependency Pairs:

ACTIVATE(nzWquot(X1, X2)) -> ZWQUOT(activate(X1), activate(X2))
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfrom(X)) -> ACTIVATE(X)


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
minus(X, 0) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
quot(0, s(Y)) -> 0
quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y)))
zWquot(XS, nil) -> nil
zWquot(nil, XS) -> nil
zWquot(cons(X, XS), cons(Y, YS)) -> cons(quot(X, Y), nzWquot(activate(XS), activate(YS)))
zWquot(X1, X2) -> nzWquot(X1, X2)
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nzWquot(X1, X2)) -> zWquot(activate(X1), activate(X2))
activate(X) -> X





Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
Neg POLO
       →DP Problem 3
Neg POLO
           →DP Problem 6
DGraph
             ...
               →DP Problem 7
Size-Change Principle
       →DP Problem 4
SCP


Dependency Pairs:

ACTIVATE(nfrom(X)) -> ACTIVATE(X)
ACTIVATE(ns(X)) -> ACTIVATE(X)


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
minus(X, 0) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
quot(0, s(Y)) -> 0
quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y)))
zWquot(XS, nil) -> nil
zWquot(nil, XS) -> nil
zWquot(cons(X, XS), cons(Y, YS)) -> cons(quot(X, Y), nzWquot(activate(XS), activate(YS)))
zWquot(X1, X2) -> nzWquot(X1, X2)
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nzWquot(X1, X2)) -> zWquot(activate(X1), activate(X2))
activate(X) -> X





We number the DPs as follows:
  1. ACTIVATE(nfrom(X)) -> ACTIVATE(X)
  2. ACTIVATE(ns(X)) -> ACTIVATE(X)
and get the following Size-Change Graph(s):
{1, 2} , {1, 2}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2} , {1, 2}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
nfrom(x1) -> nfrom(x1)
ns(x1) -> ns(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
Neg POLO
       →DP Problem 3
Neg POLO
       →DP Problem 4
Size-Change Principle


Dependency Pair:

SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS))


Rules:


from(X) -> cons(X, nfrom(ns(X)))
from(X) -> nfrom(X)
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
minus(X, 0) -> 0
minus(s(X), s(Y)) -> minus(X, Y)
quot(0, s(Y)) -> 0
quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y)))
zWquot(XS, nil) -> nil
zWquot(nil, XS) -> nil
zWquot(cons(X, XS), cons(Y, YS)) -> cons(quot(X, Y), nzWquot(activate(XS), activate(YS)))
zWquot(X1, X2) -> nzWquot(X1, X2)
s(X) -> ns(X)
activate(nfrom(X)) -> from(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nzWquot(X1, X2)) -> zWquot(activate(X1), activate(X2))
activate(X) -> X





We number the DPs as follows:
  1. SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS))
and get the following Size-Change Graph(s):
{1} , {1}
1>1

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
cons(x1, x2) -> cons(x1, x2)
s(x1) -> s(x1)

We obtain no new DP problems.

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