Term Rewriting System R:
[X, XS, N, Y, YS, X1, X2]
from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, 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)) -> 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(X)
ACTIVATE(nzWquot(X1, X2)) -> ZWQUOT(X1, X2)

Furthermore, R contains four SCCs.


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


Dependency Pair:

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


Rules:


from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, X2)
activate(X) -> X





The following dependency pair can be strictly oriented:

MINUS(s(X), s(Y)) -> MINUS(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(MINUS(x1, x2))=  x1  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 5
Dependency Graph
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Nar


Dependency Pair:


Rules:


from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, X2)
activate(X) -> X





Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pair:

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


Rules:


from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, X2)
activate(X) -> X





The following dependency pair can be strictly oriented:

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


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

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


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(QUOT(x1, x2))=  x1  
  POL(0)=  0  
  POL(minus(x1, x2))=  0  
  POL(s(x1))=  1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 6
Dependency Graph
       →DP Problem 3
Polo
       →DP Problem 4
Nar


Dependency Pair:


Rules:


from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, X2)
activate(X) -> X





Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pairs:

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


Rules:


from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, X2)
activate(X) -> X





The following dependency pair can be strictly oriented:

ACTIVATE(nzWquot(X1, X2)) -> ZWQUOT(X1, X2)


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(cons(x1, x2))=  x2  
  POL(n__zWquot(x1, x2))=  1 + x1 + x2  
  POL(ZWQUOT(x1, x2))=  x1 + x2  
  POL(ACTIVATE(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
           →DP Problem 7
Dependency Graph
       →DP Problem 4
Nar


Dependency Pairs:

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


Rules:


from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, X2)
activate(X) -> X





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Narrowing Transformation


Dependency Pair:

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


Rules:


from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, X2)
activate(X) -> X





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS))
three new Dependency Pairs are created:

SEL(s(N), cons(X, nfrom(X''))) -> SEL(N, from(X''))
SEL(s(N), cons(X, nzWquot(X1', X2'))) -> SEL(N, zWquot(X1', X2'))
SEL(s(N), cons(X, XS')) -> SEL(N, XS')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Nar
           →DP Problem 8
Narrowing Transformation


Dependency Pairs:

SEL(s(N), cons(X, XS')) -> SEL(N, XS')
SEL(s(N), cons(X, nzWquot(X1', X2'))) -> SEL(N, zWquot(X1', X2'))
SEL(s(N), cons(X, nfrom(X''))) -> SEL(N, from(X''))


Rules:


from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, X2)
activate(X) -> X





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

SEL(s(N), cons(X, nfrom(X''))) -> SEL(N, from(X''))
two new Dependency Pairs are created:

SEL(s(N), cons(X, nfrom(X'''))) -> SEL(N, cons(X''', nfrom(s(X'''))))
SEL(s(N), cons(X, nfrom(X'''))) -> SEL(N, nfrom(X'''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Nar
           →DP Problem 8
Nar
             ...
               →DP Problem 9
Narrowing Transformation


Dependency Pairs:

SEL(s(N), cons(X, nfrom(X'''))) -> SEL(N, cons(X''', nfrom(s(X'''))))
SEL(s(N), cons(X, nzWquot(X1', X2'))) -> SEL(N, zWquot(X1', X2'))
SEL(s(N), cons(X, XS')) -> SEL(N, XS')


Rules:


from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, X2)
activate(X) -> X





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

SEL(s(N), cons(X, nzWquot(X1', X2'))) -> SEL(N, zWquot(X1', X2'))
four new Dependency Pairs are created:

SEL(s(N), cons(X, nzWquot(X1'', nil))) -> SEL(N, nil)
SEL(s(N), cons(X, nzWquot(nil, X2''))) -> SEL(N, nil)
SEL(s(N), cons(X, nzWquot(cons(X'', XS'), cons(Y', YS')))) -> SEL(N, cons(quot(X'', Y'), nzWquot(activate(XS'), activate(YS'))))
SEL(s(N), cons(X, nzWquot(X1'', X2''))) -> SEL(N, nzWquot(X1'', X2''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Nar
           →DP Problem 8
Nar
             ...
               →DP Problem 10
Polynomial Ordering


Dependency Pairs:

SEL(s(N), cons(X, nzWquot(cons(X'', XS'), cons(Y', YS')))) -> SEL(N, cons(quot(X'', Y'), nzWquot(activate(XS'), activate(YS'))))
SEL(s(N), cons(X, XS')) -> SEL(N, XS')
SEL(s(N), cons(X, nfrom(X'''))) -> SEL(N, cons(X''', nfrom(s(X'''))))


Rules:


from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, X2)
activate(X) -> X





The following dependency pairs can be strictly oriented:

SEL(s(N), cons(X, nzWquot(cons(X'', XS'), cons(Y', YS')))) -> SEL(N, cons(quot(X'', Y'), nzWquot(activate(XS'), activate(YS'))))
SEL(s(N), cons(X, XS')) -> SEL(N, XS')
SEL(s(N), cons(X, nfrom(X'''))) -> SEL(N, cons(X''', nfrom(s(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(n__from(x1))=  0  
  POL(from(x1))=  0  
  POL(activate(x1))=  0  
  POL(0)=  0  
  POL(n__zWquot(x1, x2))=  0  
  POL(zWquot(x1, x2))=  0  
  POL(cons(x1, x2))=  0  
  POL(SEL(x1, x2))=  x1  
  POL(minus(x1, x2))=  0  
  POL(nil)=  0  
  POL(quot(x1, x2))=  0  
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Nar
           →DP Problem 8
Nar
             ...
               →DP Problem 11
Dependency Graph


Dependency Pair:


Rules:


from(X) -> cons(X, nfrom(s(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)
activate(nfrom(X)) -> from(X)
activate(nzWquot(X1, X2)) -> zWquot(X1, X2)
activate(X) -> X





Using the Dependency Graph resulted in no new DP problems.

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