Term Rewriting System R:
[x, y, 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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))

Innermost 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)
*'(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)
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
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS


Dependency Pairs:

+'(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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
+ > #
+' > #
0 > #
1 > #

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


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 5
Narrowing Transformation
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS


Dependency Pair:

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


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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))


Strategy:

innermost




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

+'(1(x), 1(y)) -> +'(+(x, y), 1(#))
six new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
           →DP Problem 5
Nar
             ...
               →DP Problem 6
Instantiation Transformation
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS


Dependency Pairs:

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


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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))


Strategy:

innermost




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

+'(1(#), 1(y')) -> +'(y', 1(#))
one new Dependency Pair is created:

+'(1(#), 1(#)) -> +'(#, 1(#))

The transformation is resulting in one new DP problem:



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


Dependency Pair:

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


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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

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


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 5
Nar
             ...
               →DP Problem 8
Dependency Graph
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS


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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Argument Filtering and Ordering
       →DP Problem 3
AFS
       →DP Problem 4
AFS


Dependency Pairs:

*'(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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

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


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 9
Dependency Graph
       →DP Problem 3
AFS
       →DP Problem 4
AFS


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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
Argument Filtering and Ordering
       →DP Problem 4
AFS


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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
SUM(x1) -> SUM(x1)
cons(x1, x2) -> cons(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
           →DP Problem 10
Dependency Graph
       →DP Problem 4
AFS


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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
Argument Filtering and Ordering


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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

resulting in one new DP problem.
Used Argument Filtering System:
PROD(x1) -> PROD(x1)
cons(x1, x2) -> cons(x1, x2)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
       →DP Problem 3
AFS
       →DP Problem 4
AFS
           →DP Problem 11
Dependency Graph


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) -> #
*(0(x), y) -> 0(*(x, y))
*(1(x), y) -> +(0(*(x, y)), y)
sum(nil) -> 0(#)
sum(cons(x, l)) -> +(x, sum(l))
prod(nil) -> 1(#)
prod(cons(x, l)) -> *(x, prod(l))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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