Term Rewriting System R:
[x, y, z, l, l1, l2]
+(x, 0) -> x
+(0, x) -> x
+(s(x), s(y)) -> s(s(+(x, y)))
+(+(x, y), z) -> +(x, +(y, z))
*(x, 0) -> 0
*(0, x) -> 0
*(s(x), s(y)) -> s(+(*(x, y), +(x, y)))
*(*(x, y), z) -> *(x, *(y, z))
app(nil, l) -> l
app(cons(x, l1), l2) -> cons(x, app(l1, l2))
sum(nil) -> 0
sum(cons(x, l)) -> +(x, sum(l))
sum(app(l1, l2)) -> +(sum(l1), sum(l2))
prod(nil) -> s(0)
prod(cons(x, l)) -> *(x, prod(l))
prod(app(l1, l2)) -> *(prod(l1), prod(l2))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

+'(s(x), s(y)) -> +'(x, y)
+'(+(x, y), z) -> +'(x, +(y, z))
+'(+(x, y), z) -> +'(y, z)
*'(s(x), s(y)) -> +'(*(x, y), +(x, y))
*'(s(x), s(y)) -> *'(x, y)
*'(s(x), s(y)) -> +'(x, y)
*'(*(x, y), z) -> *'(x, *(y, z))
*'(*(x, y), z) -> *'(y, z)
APP(cons(x, l1), l2) -> APP(l1, l2)
SUM(cons(x, l)) -> +'(x, sum(l))
SUM(cons(x, l)) -> SUM(l)
SUM(app(l1, l2)) -> +'(sum(l1), sum(l2))
SUM(app(l1, l2)) -> SUM(l1)
SUM(app(l1, l2)) -> SUM(l2)
PROD(cons(x, l)) -> *'(x, prod(l))
PROD(cons(x, l)) -> PROD(l)
PROD(app(l1, l2)) -> *'(prod(l1), prod(l2))
PROD(app(l1, l2)) -> PROD(l1)
PROD(app(l1, l2)) -> PROD(l2)

Furthermore, R contains five SCCs.


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


Dependency Pairs:

+'(+(x, y), z) -> +'(y, z)
+'(+(x, y), z) -> +'(x, +(y, z))
+'(s(x), s(y)) -> +'(x, y)


Rules:


+(x, 0) -> x
+(0, x) -> x
+(s(x), s(y)) -> s(s(+(x, y)))
+(+(x, y), z) -> +(x, +(y, z))
*(x, 0) -> 0
*(0, x) -> 0
*(s(x), s(y)) -> s(+(*(x, y), +(x, y)))
*(*(x, y), z) -> *(x, *(y, z))
app(nil, l) -> l
app(cons(x, l1), l2) -> cons(x, app(l1, l2))
sum(nil) -> 0
sum(cons(x, l)) -> +(x, sum(l))
sum(app(l1, l2)) -> +(sum(l1), sum(l2))
prod(nil) -> s(0)
prod(cons(x, l)) -> *(x, prod(l))
prod(app(l1, l2)) -> *(prod(l1), prod(l2))





We number the DPs as follows:
  1. +'(+(x, y), z) -> +'(y, z)
  2. +'(+(x, y), z) -> +'(x, +(y, z))
  3. +'(s(x), s(y)) -> +'(x, y)
and get the following Size-Change Graph(s):
{3, 2, 1} , {3, 2, 1}
1>1
2=2
{3, 2, 1} , {3, 2, 1}
1>1
{3, 2, 1} , {3, 2, 1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{3, 2, 1} , {3, 2, 1}
1>1
2=2
{3, 2, 1} , {3, 2, 1}
1>1
{3, 2, 1} , {3, 2, 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
Size-Change Principle
       →DP Problem 3
SCP
       →DP Problem 4
SCP
       →DP Problem 5
SCP


Dependency Pair:

APP(cons(x, l1), l2) -> APP(l1, l2)


Rules:


+(x, 0) -> x
+(0, x) -> x
+(s(x), s(y)) -> s(s(+(x, y)))
+(+(x, y), z) -> +(x, +(y, z))
*(x, 0) -> 0
*(0, x) -> 0
*(s(x), s(y)) -> s(+(*(x, y), +(x, y)))
*(*(x, y), z) -> *(x, *(y, z))
app(nil, l) -> l
app(cons(x, l1), l2) -> cons(x, app(l1, l2))
sum(nil) -> 0
sum(cons(x, l)) -> +(x, sum(l))
sum(app(l1, l2)) -> +(sum(l1), sum(l2))
prod(nil) -> s(0)
prod(cons(x, l)) -> *(x, prod(l))
prod(app(l1, l2)) -> *(prod(l1), prod(l2))





We number the DPs as follows:
  1. APP(cons(x, l1), l2) -> APP(l1, l2)
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
SCP
       →DP Problem 2
SCP
       →DP Problem 3
Size-Change Principle
       →DP Problem 4
SCP
       →DP Problem 5
SCP


Dependency Pairs:

*'(*(x, y), z) -> *'(y, z)
*'(*(x, y), z) -> *'(x, *(y, z))
*'(s(x), s(y)) -> *'(x, y)


Rules:


+(x, 0) -> x
+(0, x) -> x
+(s(x), s(y)) -> s(s(+(x, y)))
+(+(x, y), z) -> +(x, +(y, z))
*(x, 0) -> 0
*(0, x) -> 0
*(s(x), s(y)) -> s(+(*(x, y), +(x, y)))
*(*(x, y), z) -> *(x, *(y, z))
app(nil, l) -> l
app(cons(x, l1), l2) -> cons(x, app(l1, l2))
sum(nil) -> 0
sum(cons(x, l)) -> +(x, sum(l))
sum(app(l1, l2)) -> +(sum(l1), sum(l2))
prod(nil) -> s(0)
prod(cons(x, l)) -> *(x, prod(l))
prod(app(l1, l2)) -> *(prod(l1), prod(l2))





We number the DPs as follows:
  1. *'(*(x, y), z) -> *'(y, z)
  2. *'(*(x, y), z) -> *'(x, *(y, z))
  3. *'(s(x), s(y)) -> *'(x, y)
and get the following Size-Change Graph(s):
{3, 2, 1} , {3, 2, 1}
1>1
2=2
{3, 2, 1} , {3, 2, 1}
1>1
{3, 2, 1} , {3, 2, 1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{3, 2, 1} , {3, 2, 1}
1>1
2=2
{3, 2, 1} , {3, 2, 1}
1>1
2>2
{3, 2, 1} , {3, 2, 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:
s(x1) -> s(x1)

We obtain no new DP problems.


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


Dependency Pairs:

SUM(app(l1, l2)) -> SUM(l2)
SUM(app(l1, l2)) -> SUM(l1)
SUM(cons(x, l)) -> SUM(l)


Rules:


+(x, 0) -> x
+(0, x) -> x
+(s(x), s(y)) -> s(s(+(x, y)))
+(+(x, y), z) -> +(x, +(y, z))
*(x, 0) -> 0
*(0, x) -> 0
*(s(x), s(y)) -> s(+(*(x, y), +(x, y)))
*(*(x, y), z) -> *(x, *(y, z))
app(nil, l) -> l
app(cons(x, l1), l2) -> cons(x, app(l1, l2))
sum(nil) -> 0
sum(cons(x, l)) -> +(x, sum(l))
sum(app(l1, l2)) -> +(sum(l1), sum(l2))
prod(nil) -> s(0)
prod(cons(x, l)) -> *(x, prod(l))
prod(app(l1, l2)) -> *(prod(l1), prod(l2))





We number the DPs as follows:
  1. SUM(app(l1, l2)) -> SUM(l2)
  2. SUM(app(l1, l2)) -> SUM(l1)
  3. SUM(cons(x, l)) -> SUM(l)
and get the following Size-Change Graph(s):
{3, 2, 1} , {3, 2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{3, 2, 1} , {3, 2, 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)
app(x1, x2) -> app(x1, x2)

We obtain no new DP problems.


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


Dependency Pairs:

PROD(app(l1, l2)) -> PROD(l2)
PROD(app(l1, l2)) -> PROD(l1)
PROD(cons(x, l)) -> PROD(l)


Rules:


+(x, 0) -> x
+(0, x) -> x
+(s(x), s(y)) -> s(s(+(x, y)))
+(+(x, y), z) -> +(x, +(y, z))
*(x, 0) -> 0
*(0, x) -> 0
*(s(x), s(y)) -> s(+(*(x, y), +(x, y)))
*(*(x, y), z) -> *(x, *(y, z))
app(nil, l) -> l
app(cons(x, l1), l2) -> cons(x, app(l1, l2))
sum(nil) -> 0
sum(cons(x, l)) -> +(x, sum(l))
sum(app(l1, l2)) -> +(sum(l1), sum(l2))
prod(nil) -> s(0)
prod(cons(x, l)) -> *(x, prod(l))
prod(app(l1, l2)) -> *(prod(l1), prod(l2))





We number the DPs as follows:
  1. PROD(app(l1, l2)) -> PROD(l2)
  2. PROD(app(l1, l2)) -> PROD(l1)
  3. PROD(cons(x, l)) -> PROD(l)
and get the following Size-Change Graph(s):
{3, 2, 1} , {3, 2, 1}
1>1

which lead(s) to this/these maximal multigraph(s):
{3, 2, 1} , {3, 2, 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)
app(x1, x2) -> app(x1, x2)

We obtain no new DP problems.

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