Term Rewriting System R:
[k, l, x, y]
app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(cons(x, l), k) -> APP(l, k)
SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l))
SUM(cons(x, cons(y, l))) -> PLUS(x, y)
SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k)))))
SUM(app(l, cons(x, cons(y, k)))) -> APP(l, sum(cons(x, cons(y, k))))
SUM(app(l, cons(x, cons(y, k)))) -> SUM(cons(x, cons(y, k)))
SUM(plus(cons(0, x), cons(y, l))) -> PRED(sum(cons(s(x), cons(y, l))))
SUM(plus(cons(0, x), cons(y, l))) -> SUM(cons(s(x), cons(y, l)))
PLUS(s(x), y) -> PLUS(x, y)

Furthermore, R contains four SCCs.


   R
DPs
       →DP Problem 1
Usable Rules (Innermost)
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules


Dependency Pair:

APP(cons(x, l), k) -> APP(l, k)


Rules:


app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)


Strategy:

innermost




As we are in the innermost case, we can delete all 10 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
           →DP Problem 5
Size-Change Principle
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules


Dependency Pair:

APP(cons(x, l), k) -> APP(l, k)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. APP(cons(x, l), k) -> APP(l, k)
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:
cons(x1, x2) -> cons(x1, x2)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
Usable Rules (Innermost)
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules


Dependency Pair:

PLUS(s(x), y) -> PLUS(x, y)


Rules:


app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)


Strategy:

innermost




As we are in the innermost case, we can delete all 10 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
           →DP Problem 6
Size-Change Principle
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules


Dependency Pair:

PLUS(s(x), y) -> PLUS(x, y)


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. PLUS(s(x), y) -> PLUS(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
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
Usable Rules (Innermost)
       →DP Problem 4
UsableRules


Dependency Pair:

SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l))


Rules:


app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)


Strategy:

innermost




As we are in the innermost case, we can delete all 8 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
           →DP Problem 7
Modular Removal of Rules
       →DP Problem 4
UsableRules


Dependency Pair:

SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l))


Rules:


plus(s(x), y) -> s(plus(x, y))
plus(0, y) -> y


Strategy:

innermost




We have the following set of usable rules:

plus(s(x), y) -> s(plus(x, y))
plus(0, y) -> y
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(plus(x1, x2))=  x1 + x2  
  POL(SUM(x1))=  1 + x1  
  POL(0)=  1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(s(x1))=  x1  

We have the following set D of usable symbols: {plus, SUM, cons, s}
No Dependency Pairs can be deleted.
The following rules can be deleted as they contain symbols in their lhs which do not occur in D:

plus(0, y) -> y


The result of this processor delivers one new DP problem.



   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
           →DP Problem 7
MRR
             ...
               →DP Problem 8
Modular Removal of Rules
       →DP Problem 4
UsableRules


Dependency Pair:

SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l))


Rule:


plus(s(x), y) -> s(plus(x, y))


Strategy:

innermost




We have the following set of usable rules:

plus(s(x), y) -> s(plus(x, y))
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(plus(x1, x2))=  x1 + x2  
  POL(SUM(x1))=  1 + x1  
  POL(cons(x1, x2))=  1 + x1 + x2  
  POL(s(x1))=  x1  

We have the following set D of usable symbols: {plus, SUM, cons, s}
The following Dependency Pairs can be deleted as the lhs is strictly greater than the corresponding rhs:

SUM(cons(x, cons(y, l))) -> SUM(cons(plus(x, y), l))

No Rules can be deleted.

After the removal, there are no SCCs in the dependency graph which results in no DP problems which have to be solved.



   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
Usable Rules (Innermost)


Dependency Pair:

SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k)))))


Rules:


app(nil, k) -> k
app(l, nil) -> l
app(cons(x, l), k) -> cons(x, app(l, k))
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
sum(app(l, cons(x, cons(y, k)))) -> sum(app(l, sum(cons(x, cons(y, k)))))
sum(plus(cons(0, x), cons(y, l))) -> pred(sum(cons(s(x), cons(y, l))))
plus(0, y) -> y
plus(s(x), y) -> s(plus(x, y))
pred(cons(s(x), nil)) -> cons(x, nil)


Strategy:

innermost




As we are in the innermost case, we can delete all 5 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
           →DP Problem 9
Rewriting Transformation


Dependency Pair:

SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k)))))


Rules:


app(l, nil) -> l
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
plus(s(x), y) -> s(plus(x, y))
plus(0, y) -> y


Strategy:

innermost




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

SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(x, cons(y, k)))))
one new Dependency Pair is created:

SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(plus(x, y), k))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
           →DP Problem 9
Rw
             ...
               →DP Problem 10
Modular Removal of Rules


Dependency Pair:

SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(plus(x, y), k))))


Rules:


app(l, nil) -> l
sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
plus(s(x), y) -> s(plus(x, y))
plus(0, y) -> y


Strategy:

innermost




We have the following set of usable rules:

app(l, nil) -> l
sum(cons(x, nil)) -> cons(x, nil)
plus(s(x), y) -> s(plus(x, y))
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
plus(0, y) -> y
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(plus(x1, x2))=  x1 + x2  
  POL(SUM(x1))=  1 + x1  
  POL(0)=  1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(nil)=  0  
  POL(sum(x1))=  x1  
  POL(s(x1))=  x1  
  POL(app(x1, x2))=  1 + x1 + x2  

We have the following set D of usable symbols: {plus, SUM, cons, nil, sum, s, app}
No Dependency Pairs can be deleted.
The following rules can be deleted as they contain symbols in their lhs which do not occur in D:

plus(0, y) -> y
The following rules can be deleted as the lhs is strictly greater than the corresponding rhs:

app(l, nil) -> l


The result of this processor delivers one new DP problem.



   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
       →DP Problem 3
UsableRules
       →DP Problem 4
UsableRules
           →DP Problem 9
Rw
             ...
               →DP Problem 11
Modular Removal of Rules


Dependency Pair:

SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(plus(x, y), k))))


Rules:


sum(cons(x, nil)) -> cons(x, nil)
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
plus(s(x), y) -> s(plus(x, y))


Strategy:

innermost




We have the following set of usable rules:

sum(cons(x, nil)) -> cons(x, nil)
plus(s(x), y) -> s(plus(x, y))
sum(cons(x, cons(y, l))) -> sum(cons(plus(x, y), l))
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
  POL(plus(x1, x2))=  x1 + x2  
  POL(SUM(x1))=  1 + x1  
  POL(cons(x1, x2))=  1 + x1 + x2  
  POL(nil)=  0  
  POL(sum(x1))=  x1  
  POL(s(x1))=  x1  
  POL(app(x1, x2))=  1 + x1 + x2  

We have the following set D of usable symbols: {plus, SUM, cons, nil, sum, s, app}
The following Dependency Pairs can be deleted as the lhs is strictly greater than the corresponding rhs:

SUM(app(l, cons(x, cons(y, k)))) -> SUM(app(l, sum(cons(plus(x, y), k))))

No Rules can be deleted.

After the removal, there are no SCCs in the dependency graph which results in no DP problems which have to be solved.


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