Term Rewriting System R:
[X, XS, N, X1, X2]
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aafter(0, XS) -> mark(XS)
aafter(s(N), cons(X, XS)) -> aafter(mark(N), mark(XS))
aafter(X1, X2) -> after(X1, X2)
mark(from(X)) -> afrom(mark(X))
mark(after(X1, X2)) -> aafter(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(0) -> 0

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

AFROM(X) -> MARK(X)
AAFTER(0, XS) -> MARK(XS)
AAFTER(s(N), cons(X, XS)) -> AAFTER(mark(N), mark(XS))
AAFTER(s(N), cons(X, XS)) -> MARK(N)
AAFTER(s(N), cons(X, XS)) -> MARK(XS)
MARK(from(X)) -> AFROM(mark(X))
MARK(from(X)) -> MARK(X)
MARK(after(X1, X2)) -> AAFTER(mark(X1), mark(X2))
MARK(after(X1, X2)) -> MARK(X1)
MARK(after(X1, X2)) -> MARK(X2)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(s(X)) -> MARK(X)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

AAFTER(s(N), cons(X, XS)) -> MARK(XS)
AAFTER(s(N), cons(X, XS)) -> MARK(N)
AAFTER(s(N), cons(X, XS)) -> AAFTER(mark(N), mark(XS))
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(after(X1, X2)) -> MARK(X2)
MARK(after(X1, X2)) -> MARK(X1)
AAFTER(0, XS) -> MARK(XS)
MARK(after(X1, X2)) -> AAFTER(mark(X1), mark(X2))
MARK(from(X)) -> MARK(X)
MARK(from(X)) -> AFROM(mark(X))
AFROM(X) -> MARK(X)


Rules:


afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aafter(0, XS) -> mark(XS)
aafter(s(N), cons(X, XS)) -> aafter(mark(N), mark(XS))
aafter(X1, X2) -> after(X1, X2)
mark(from(X)) -> afrom(mark(X))
mark(after(X1, X2)) -> aafter(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(0) -> 0


Strategy:

innermost




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

AAFTER(s(N), cons(X, XS)) -> AAFTER(mark(N), mark(XS))
10 new Dependency Pairs are created:

AAFTER(s(from(X'')), cons(X, XS)) -> AAFTER(afrom(mark(X'')), mark(XS))
AAFTER(s(after(X1', X2')), cons(X, XS)) -> AAFTER(aafter(mark(X1'), mark(X2')), mark(XS))
AAFTER(s(cons(X1', X2')), cons(X, XS)) -> AAFTER(cons(mark(X1'), X2'), mark(XS))
AAFTER(s(s(X'')), cons(X, XS)) -> AAFTER(s(mark(X'')), mark(XS))
AAFTER(s(0), cons(X, XS)) -> AAFTER(0, mark(XS))
AAFTER(s(N), cons(X, from(X''))) -> AAFTER(mark(N), afrom(mark(X'')))
AAFTER(s(N), cons(X, after(X1', X2'))) -> AAFTER(mark(N), aafter(mark(X1'), mark(X2')))
AAFTER(s(N), cons(X, cons(X1', X2'))) -> AAFTER(mark(N), cons(mark(X1'), X2'))
AAFTER(s(N), cons(X, s(X''))) -> AAFTER(mark(N), s(mark(X'')))
AAFTER(s(N), cons(X, 0)) -> AAFTER(mark(N), 0)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Narrowing Transformation


Dependency Pairs:

AAFTER(s(N), cons(X, 0)) -> AAFTER(mark(N), 0)
AAFTER(s(N), cons(X, s(X''))) -> AAFTER(mark(N), s(mark(X'')))
AAFTER(s(N), cons(X, cons(X1', X2'))) -> AAFTER(mark(N), cons(mark(X1'), X2'))
AAFTER(s(N), cons(X, after(X1', X2'))) -> AAFTER(mark(N), aafter(mark(X1'), mark(X2')))
AAFTER(s(N), cons(X, from(X''))) -> AAFTER(mark(N), afrom(mark(X'')))
AAFTER(s(0), cons(X, XS)) -> AAFTER(0, mark(XS))
AAFTER(s(s(X'')), cons(X, XS)) -> AAFTER(s(mark(X'')), mark(XS))
AAFTER(s(after(X1', X2')), cons(X, XS)) -> AAFTER(aafter(mark(X1'), mark(X2')), mark(XS))
AAFTER(s(from(X'')), cons(X, XS)) -> AAFTER(afrom(mark(X'')), mark(XS))
AAFTER(s(N), cons(X, XS)) -> MARK(N)
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(after(X1, X2)) -> MARK(X2)
MARK(after(X1, X2)) -> MARK(X1)
AAFTER(0, XS) -> MARK(XS)
MARK(after(X1, X2)) -> AAFTER(mark(X1), mark(X2))
MARK(from(X)) -> MARK(X)
AFROM(X) -> MARK(X)
MARK(from(X)) -> AFROM(mark(X))
AAFTER(s(N), cons(X, XS)) -> MARK(XS)


Rules:


afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aafter(0, XS) -> mark(XS)
aafter(s(N), cons(X, XS)) -> aafter(mark(N), mark(XS))
aafter(X1, X2) -> after(X1, X2)
mark(from(X)) -> afrom(mark(X))
mark(after(X1, X2)) -> aafter(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(0) -> 0


Strategy:

innermost




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

MARK(after(X1, X2)) -> AAFTER(mark(X1), mark(X2))
10 new Dependency Pairs are created:

MARK(after(from(X'), X2)) -> AAFTER(afrom(mark(X')), mark(X2))
MARK(after(after(X1'', X2''), X2)) -> AAFTER(aafter(mark(X1''), mark(X2'')), mark(X2))
MARK(after(cons(X1'', X2''), X2)) -> AAFTER(cons(mark(X1''), X2''), mark(X2))
MARK(after(s(X'), X2)) -> AAFTER(s(mark(X')), mark(X2))
MARK(after(0, X2)) -> AAFTER(0, mark(X2))
MARK(after(X1, from(X'))) -> AAFTER(mark(X1), afrom(mark(X')))
MARK(after(X1, after(X1'', X2''))) -> AAFTER(mark(X1), aafter(mark(X1''), mark(X2'')))
MARK(after(X1, cons(X1'', X2''))) -> AAFTER(mark(X1), cons(mark(X1''), X2''))
MARK(after(X1, s(X'))) -> AAFTER(mark(X1), s(mark(X')))
MARK(after(X1, 0)) -> AAFTER(mark(X1), 0)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 3
Polynomial Ordering


Dependency Pairs:

MARK(after(X1, 0)) -> AAFTER(mark(X1), 0)
MARK(after(X1, s(X'))) -> AAFTER(mark(X1), s(mark(X')))
MARK(after(X1, cons(X1'', X2''))) -> AAFTER(mark(X1), cons(mark(X1''), X2''))
MARK(after(X1, after(X1'', X2''))) -> AAFTER(mark(X1), aafter(mark(X1''), mark(X2'')))
MARK(after(X1, from(X'))) -> AAFTER(mark(X1), afrom(mark(X')))
MARK(after(0, X2)) -> AAFTER(0, mark(X2))
AAFTER(s(N), cons(X, s(X''))) -> AAFTER(mark(N), s(mark(X'')))
AAFTER(s(N), cons(X, cons(X1', X2'))) -> AAFTER(mark(N), cons(mark(X1'), X2'))
AAFTER(s(N), cons(X, after(X1', X2'))) -> AAFTER(mark(N), aafter(mark(X1'), mark(X2')))
AAFTER(s(N), cons(X, from(X''))) -> AAFTER(mark(N), afrom(mark(X'')))
AAFTER(s(0), cons(X, XS)) -> AAFTER(0, mark(XS))
AAFTER(s(s(X'')), cons(X, XS)) -> AAFTER(s(mark(X'')), mark(XS))
AAFTER(s(after(X1', X2')), cons(X, XS)) -> AAFTER(aafter(mark(X1'), mark(X2')), mark(XS))
AAFTER(s(from(X'')), cons(X, XS)) -> AAFTER(afrom(mark(X'')), mark(XS))
MARK(after(s(X'), X2)) -> AAFTER(s(mark(X')), mark(X2))
AAFTER(s(N), cons(X, XS)) -> MARK(XS)
MARK(after(after(X1'', X2''), X2)) -> AAFTER(aafter(mark(X1''), mark(X2'')), mark(X2))
AAFTER(s(N), cons(X, XS)) -> MARK(N)
MARK(after(from(X'), X2)) -> AAFTER(afrom(mark(X')), mark(X2))
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(after(X1, X2)) -> MARK(X2)
MARK(after(X1, X2)) -> MARK(X1)
MARK(from(X)) -> MARK(X)
AFROM(X) -> MARK(X)
MARK(from(X)) -> AFROM(mark(X))
AAFTER(0, XS) -> MARK(XS)
AAFTER(s(N), cons(X, 0)) -> AAFTER(mark(N), 0)


Rules:


afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aafter(0, XS) -> mark(XS)
aafter(s(N), cons(X, XS)) -> aafter(mark(N), mark(XS))
aafter(X1, X2) -> after(X1, X2)
mark(from(X)) -> afrom(mark(X))
mark(after(X1, X2)) -> aafter(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(0) -> 0


Strategy:

innermost




The following dependency pairs can be strictly oriented:

AAFTER(s(from(X'')), cons(X, XS)) -> AAFTER(afrom(mark(X'')), mark(XS))
MARK(after(from(X'), X2)) -> AAFTER(afrom(mark(X')), mark(X2))


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

aafter(0, XS) -> mark(XS)
aafter(s(N), cons(X, XS)) -> aafter(mark(N), mark(XS))
aafter(X1, X2) -> after(X1, X2)
mark(from(X)) -> afrom(mark(X))
mark(after(X1, X2)) -> aafter(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(0) -> 0
afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(from(x1))=  0  
  POL(0)=  1  
  POL(MARK(x1))=  1  
  POL(cons(x1, x2))=  0  
  POL(A__AFTER(x1, x2))=  x1  
  POL(A__FROM(x1))=  1  
  POL(s(x1))=  1  
  POL(after(x1, x2))=  0  
  POL(a__after(x1, x2))=  1  
  POL(mark(x1))=  1  
  POL(a__from(x1))=  0  

resulting in one new DP problem.



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




The following remains to be proven:
Dependency Pairs:

MARK(after(X1, 0)) -> AAFTER(mark(X1), 0)
MARK(after(X1, s(X'))) -> AAFTER(mark(X1), s(mark(X')))
MARK(after(X1, cons(X1'', X2''))) -> AAFTER(mark(X1), cons(mark(X1''), X2''))
MARK(after(X1, after(X1'', X2''))) -> AAFTER(mark(X1), aafter(mark(X1''), mark(X2'')))
MARK(after(X1, from(X'))) -> AAFTER(mark(X1), afrom(mark(X')))
MARK(after(0, X2)) -> AAFTER(0, mark(X2))
AAFTER(s(N), cons(X, s(X''))) -> AAFTER(mark(N), s(mark(X'')))
AAFTER(s(N), cons(X, cons(X1', X2'))) -> AAFTER(mark(N), cons(mark(X1'), X2'))
AAFTER(s(N), cons(X, after(X1', X2'))) -> AAFTER(mark(N), aafter(mark(X1'), mark(X2')))
AAFTER(s(N), cons(X, from(X''))) -> AAFTER(mark(N), afrom(mark(X'')))
AAFTER(s(0), cons(X, XS)) -> AAFTER(0, mark(XS))
AAFTER(s(s(X'')), cons(X, XS)) -> AAFTER(s(mark(X'')), mark(XS))
AAFTER(s(after(X1', X2')), cons(X, XS)) -> AAFTER(aafter(mark(X1'), mark(X2')), mark(XS))
MARK(after(s(X'), X2)) -> AAFTER(s(mark(X')), mark(X2))
AAFTER(s(N), cons(X, XS)) -> MARK(XS)
MARK(after(after(X1'', X2''), X2)) -> AAFTER(aafter(mark(X1''), mark(X2'')), mark(X2))
AAFTER(s(N), cons(X, XS)) -> MARK(N)
MARK(s(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(after(X1, X2)) -> MARK(X2)
MARK(after(X1, X2)) -> MARK(X1)
MARK(from(X)) -> MARK(X)
AFROM(X) -> MARK(X)
MARK(from(X)) -> AFROM(mark(X))
AAFTER(0, XS) -> MARK(XS)
AAFTER(s(N), cons(X, 0)) -> AAFTER(mark(N), 0)


Rules:


afrom(X) -> cons(mark(X), from(s(X)))
afrom(X) -> from(X)
aafter(0, XS) -> mark(XS)
aafter(s(N), cons(X, XS)) -> aafter(mark(N), mark(XS))
aafter(X1, X2) -> after(X1, X2)
mark(from(X)) -> afrom(mark(X))
mark(after(X1, X2)) -> aafter(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(s(X)) -> s(mark(X))
mark(0) -> 0


Strategy:

innermost



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