Term Rewriting System R:
[x, y, z, l]
0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

+'(0(x), 0(y)) -> 0'(+(x, y))
+'(0(x), 0(y)) -> +'(x, y)
+'(0(x), 1(y)) -> +'(x, y)
+'(1(x), 0(y)) -> +'(x, y)
+'(1(x), 1(y)) -> 0'(+(+(x, y), 1(#)))
+'(1(x), 1(y)) -> +'(+(x, y), 1(#))
+'(1(x), 1(y)) -> +'(x, y)
+'(+(x, y), z) -> +'(x, +(y, z))
+'(+(x, y), z) -> +'(y, z)
*'(0(x), y) -> 0'(*(x, y))
*'(0(x), y) -> *'(x, y)
*'(1(x), y) -> +'(0(*(x, y)), y)
*'(1(x), y) -> 0'(*(x, y))
*'(1(x), y) -> *'(x, y)
*'(*(x, y), z) -> *'(x, *(y, z))
*'(*(x, y), z) -> *'(y, z)
SUM(nil) -> 0'(#)
SUM(cons(x, l)) -> +'(x, sum(l))
SUM(cons(x, l)) -> SUM(l)
PROD(cons(x, l)) -> *'(x, prod(l))
PROD(cons(x, l)) -> PROD(l)

Furthermore, R contains four SCCs.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Argument Filtering and Ordering`
`       →DP Problem 2`
`         ↳Remaining`
`       →DP Problem 3`
`         ↳Remaining`
`       →DP Problem 4`
`         ↳Remaining`

Dependency Pairs:

+'(+(x, y), z) -> +'(y, z)
+'(+(x, y), z) -> +'(x, +(y, z))
+'(1(x), 1(y)) -> +'(x, y)
+'(1(x), 1(y)) -> +'(+(x, y), 1(#))
+'(1(x), 0(y)) -> +'(x, y)
+'(0(x), 1(y)) -> +'(x, y)
+'(0(x), 0(y)) -> +'(x, y)

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

The following dependency pairs can be strictly oriented:

+'(1(x), 1(y)) -> +'(x, y)
+'(1(x), 1(y)) -> +'(+(x, y), 1(#))
+'(1(x), 0(y)) -> +'(x, y)
+'(0(x), 1(y)) -> +'(x, y)

The following usable rules using the Ce-refinement can be oriented:

+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
0(#) -> #

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(#) =  0 POL(0(x1)) =  x1 POL(1(x1)) =  1 + x1 POL(+(x1, x2)) =  x1 + x2 POL(+'(x1, x2)) =  1 + x1 + x2

resulting in one new DP problem.
Used Argument Filtering System:
+'(x1, x2) -> +'(x1, x2)
1(x1) -> 1(x1)
0(x1) -> 0(x1)
+(x1, x2) -> +(x1, x2)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`           →DP Problem 5`
`             ↳Argument Filtering and Ordering`
`       →DP Problem 2`
`         ↳Remaining`
`       →DP Problem 3`
`         ↳Remaining`
`       →DP Problem 4`
`         ↳Remaining`

Dependency Pairs:

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

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

The following dependency pair can be strictly oriented:

+'(0(x), 0(y)) -> +'(x, y)

The following usable rules using the Ce-refinement can be oriented:

+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
0(#) -> #

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(#) =  0 POL(0(x1)) =  1 + x1 POL(1(x1)) =  1 + x1 POL(+(x1, x2)) =  x1 + x2 POL(+'(x1, x2)) =  1 + x1 + x2

resulting in one new DP problem.
Used Argument Filtering System:
+'(x1, x2) -> +'(x1, x2)
0(x1) -> 0(x1)
+(x1, x2) -> +(x1, x2)
1(x1) -> 1(x1)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`           →DP Problem 5`
`             ↳AFS`
`             ...`
`               →DP Problem 6`
`                 ↳Argument Filtering and Ordering`
`       →DP Problem 2`
`         ↳Remaining`
`       →DP Problem 3`
`         ↳Remaining`
`       →DP Problem 4`
`         ↳Remaining`

Dependency Pairs:

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

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

The following dependency pair can be strictly oriented:

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

The following usable rules using the Ce-refinement can be oriented:

+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
0(#) -> #

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(#) =  0 POL(0(x1)) =  x1 POL(1(x1)) =  1 + x1 POL(+(x1, x2)) =  1 + x1 + x2 POL(+'(x1, x2)) =  1 + x1 + x2

resulting in one new DP problem.
Used Argument Filtering System:
+'(x1, x2) -> +'(x1, x2)
+(x1, x2) -> +(x1, x2)
0(x1) -> 0(x1)
1(x1) -> 1(x1)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`           →DP Problem 5`
`             ↳AFS`
`             ...`
`               →DP Problem 7`
`                 ↳Argument Filtering and Ordering`
`       →DP Problem 2`
`         ↳Remaining`
`       →DP Problem 3`
`         ↳Remaining`
`       →DP Problem 4`
`         ↳Remaining`

Dependency Pair:

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

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

The following dependency pair can be strictly oriented:

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

The following usable rules using the Ce-refinement can be oriented:

+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
0(#) -> #

Used ordering: Polynomial ordering with Polynomial interpretation:
 POL(#) =  0 POL(0(x1)) =  x1 POL(1(x1)) =  1 + x1 POL(+(x1, x2)) =  1 + x1 + x2

resulting in one new DP problem.
Used Argument Filtering System:
+'(x1, x2) -> x1
+(x1, x2) -> +(x1, x2)
0(x1) -> 0(x1)
1(x1) -> 1(x1)

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`           →DP Problem 5`
`             ↳AFS`
`             ...`
`               →DP Problem 8`
`                 ↳Dependency Graph`
`       →DP Problem 2`
`         ↳Remaining`
`       →DP Problem 3`
`         ↳Remaining`
`       →DP Problem 4`
`         ↳Remaining`

Dependency Pair:

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

Using the Dependency Graph resulted in no new DP problems.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳Remaining Obligation(s)`
`       →DP Problem 3`
`         ↳Remaining Obligation(s)`
`       →DP Problem 4`
`         ↳Remaining Obligation(s)`

The following remains to be proven:
• Dependency Pairs:

*'(*(x, y), z) -> *'(y, z)
*'(*(x, y), z) -> *'(x, *(y, z))
*'(1(x), y) -> *'(x, y)
*'(0(x), y) -> *'(x, y)

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

• Dependency Pair:

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

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

• Dependency Pair:

PROD(cons(x, l)) -> PROD(l)

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳Remaining Obligation(s)`
`       →DP Problem 3`
`         ↳Remaining Obligation(s)`
`       →DP Problem 4`
`         ↳Remaining Obligation(s)`

The following remains to be proven:
• Dependency Pairs:

*'(*(x, y), z) -> *'(y, z)
*'(*(x, y), z) -> *'(x, *(y, z))
*'(1(x), y) -> *'(x, y)
*'(0(x), y) -> *'(x, y)

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

• Dependency Pair:

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

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

• Dependency Pair:

PROD(cons(x, l)) -> PROD(l)

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳AFS`
`       →DP Problem 2`
`         ↳Remaining Obligation(s)`
`       →DP Problem 3`
`         ↳Remaining Obligation(s)`
`       →DP Problem 4`
`         ↳Remaining Obligation(s)`

The following remains to be proven:
• Dependency Pairs:

*'(*(x, y), z) -> *'(y, z)
*'(*(x, y), z) -> *'(x, *(y, z))
*'(1(x), y) -> *'(x, y)
*'(0(x), y) -> *'(x, y)

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

• Dependency Pair:

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

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

• Dependency Pair:

PROD(cons(x, l)) -> PROD(l)

Rules:

0(#) -> #
+(x, #) -> x
+(#, x) -> x
+(0(x), 0(y)) -> 0(+(x, y))
+(0(x), 1(y)) -> 1(+(x, y))
+(1(x), 0(y)) -> 1(+(x, y))
+(1(x), 1(y)) -> 0(+(+(x, y), 1(#)))
+(+(x, y), z) -> +(x, +(y, z))
*(#, x) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
*(*(x, y), z) -> *(x, *(y, z))
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

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