Term Rewriting System R:
[y, x, ys, xs]
+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

+'(s(x), y) -> +'(x, y)
++'(:(x, xs), ys) -> ++'(xs, ys)
SUM(:(x, :(y, xs))) -> SUM(:(+(x, y), xs))
SUM(:(x, :(y, xs))) -> +'(x, y)
SUM(++(xs, :(x, :(y, ys)))) -> SUM(++(xs, sum(:(x, :(y, ys)))))
SUM(++(xs, :(x, :(y, ys)))) -> ++'(xs, sum(:(x, :(y, ys))))
SUM(++(xs, :(x, :(y, ys)))) -> SUM(:(x, :(y, ys)))
-'(s(x), s(y)) -> -'(x, y)
QUOT(s(x), s(y)) -> QUOT(-(x, y), s(y))
QUOT(s(x), s(y)) -> -'(x, y)
LENGTH(:(x, xs)) -> LENGTH(xs)
AVG(xs) -> QUOT(hd(sum(xs)), length(xs))
AVG(xs) -> HD(sum(xs))
AVG(xs) -> SUM(xs)
AVG(xs) -> LENGTH(xs)

Furthermore, R contains seven SCCs.


   R
DPs
       →DP Problem 1
Forward Instantiation Transformation
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:

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


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

+'(s(x), y) -> +'(x, y)
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 8
Forward Instantiation Transformation
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:

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


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

+'(s(s(x'')), y'') -> +'(s(x''), y'')
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



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


Dependency Pair:

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


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost 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)
s(x1) -> s(x1)


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


Dependency Pair:


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Forward Instantiation Transformation
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:

++'(:(x, xs), ys) -> ++'(xs, ys)


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

++'(:(x, xs), ys) -> ++'(xs, ys)
one new Dependency Pair is created:

++'(:(x, :(x'', xs'')), ys'') -> ++'(:(x'', xs''), ys'')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 11
Forward Instantiation Transformation
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:

++'(:(x, :(x'', xs'')), ys'') -> ++'(:(x'', xs''), ys'')


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

++'(:(x, :(x'', xs'')), ys'') -> ++'(:(x'', xs''), ys'')
one new Dependency Pair is created:

++'(:(x, :(x'''', :(x''''', xs''''))), ys'''') -> ++'(:(x'''', :(x''''', xs'''')), ys'''')

The transformation is resulting in one new DP problem:



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


Dependency Pair:

++'(:(x, :(x'''', :(x''''', xs''''))), ys'''') -> ++'(:(x'''', :(x''''', xs'''')), ys'''')


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




The following dependency pair can be strictly oriented:

++'(:(x, :(x'''', :(x''''', xs''''))), ys'''') -> ++'(:(x'''', :(x''''', xs'''')), ys'''')


There are no usable rules for innermost 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)
:(x1, x2) -> :(x1, x2)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 11
FwdInst
             ...
               →DP Problem 13
Dependency Graph
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
Forward Instantiation Transformation
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:

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


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

-'(s(x), s(y)) -> -'(x, y)
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
           →DP Problem 14
Forward Instantiation Transformation
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:

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


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

-'(s(s(x'')), s(s(y''))) -> -'(s(x''), s(y''))
one new Dependency Pair is created:

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

The transformation is resulting in one new DP problem:



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


Dependency Pair:

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


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost 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)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
           →DP Problem 14
FwdInst
             ...
               →DP Problem 16
Dependency Graph
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
Forward Instantiation Transformation
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:

LENGTH(:(x, xs)) -> LENGTH(xs)


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

LENGTH(:(x, xs)) -> LENGTH(xs)
one new Dependency Pair is created:

LENGTH(:(x, :(x'', xs''))) -> LENGTH(:(x'', xs''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
           →DP Problem 17
Forward Instantiation Transformation
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:

LENGTH(:(x, :(x'', xs''))) -> LENGTH(:(x'', xs''))


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

LENGTH(:(x, :(x'', xs''))) -> LENGTH(:(x'', xs''))
one new Dependency Pair is created:

LENGTH(:(x, :(x'''', :(x''''', xs'''')))) -> LENGTH(:(x'''', :(x''''', xs'''')))

The transformation is resulting in one new DP problem:



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


Dependency Pair:

LENGTH(:(x, :(x'''', :(x''''', xs'''')))) -> LENGTH(:(x'''', :(x''''', xs'''')))


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




The following dependency pair can be strictly oriented:

LENGTH(:(x, :(x'''', :(x''''', xs'''')))) -> LENGTH(:(x'''', :(x''''', xs'''')))


There are no usable rules for innermost 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:
LENGTH(x1) -> LENGTH(x1)
:(x1, x2) -> :(x1, x2)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
           →DP Problem 17
FwdInst
             ...
               →DP Problem 19
Dependency Graph
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pair:

SUM(:(x, :(y, xs))) -> SUM(:(+(x, y), xs))


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




The following dependency pair can be strictly oriented:

SUM(:(x, :(y, xs))) -> SUM(:(+(x, y), xs))


The following usable rules for innermost can be oriented:

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


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)
:(x1, x2) -> :(x1, x2)
+(x1, x2) -> x2
s(x1) -> x1


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
           →DP Problem 20
Dependency Graph
       →DP Problem 6
Nar
       →DP Problem 7
Nar


Dependency Pair:


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Narrowing Transformation
       →DP Problem 7
Nar


Dependency Pair:

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


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

QUOT(s(x), s(y)) -> QUOT(-(x, y), s(y))
three new Dependency Pairs are created:

QUOT(s(x''), s(0)) -> QUOT(x'', s(0))
QUOT(s(0), s(s(y''))) -> QUOT(0, s(s(y'')))
QUOT(s(s(x'')), s(s(y''))) -> QUOT(-(x'', y''), s(s(y'')))

The transformation is resulting in two new DP problems:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 21
Forward Instantiation Transformation
           →DP Problem 22
Nar
       →DP Problem 7
Nar


Dependency Pair:

QUOT(s(x''), s(0)) -> QUOT(x'', s(0))


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

QUOT(s(x''), s(0)) -> QUOT(x'', s(0))
one new Dependency Pair is created:

QUOT(s(s(x'''')), s(0)) -> QUOT(s(x''''), s(0))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 21
FwdInst
             ...
               →DP Problem 23
Argument Filtering and Ordering
           →DP Problem 22
Nar
       →DP Problem 7
Nar


Dependency Pair:

QUOT(s(s(x'''')), s(0)) -> QUOT(s(x''''), s(0))


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




The following dependency pair can be strictly oriented:

QUOT(s(s(x'''')), s(0)) -> QUOT(s(x''''), s(0))


There are no usable rules for innermost 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:
QUOT(x1, x2) -> QUOT(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 21
FwdInst
             ...
               →DP Problem 26
Dependency Graph
           →DP Problem 22
Nar
       →DP Problem 7
Nar


Dependency Pair:


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 21
FwdInst
           →DP Problem 22
Narrowing Transformation
       →DP Problem 7
Nar


Dependency Pair:

QUOT(s(s(x'')), s(s(y''))) -> QUOT(-(x'', y''), s(s(y'')))


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

QUOT(s(s(x'')), s(s(y''))) -> QUOT(-(x'', y''), s(s(y'')))
three new Dependency Pairs are created:

QUOT(s(s(x''')), s(s(0))) -> QUOT(x''', s(s(0)))
QUOT(s(s(0)), s(s(s(y')))) -> QUOT(0, s(s(s(y'))))
QUOT(s(s(s(x'))), s(s(s(y')))) -> QUOT(-(x', y'), s(s(s(y'))))

The transformation is resulting in two new DP problems:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 21
FwdInst
           →DP Problem 22
Nar
             ...
               →DP Problem 24
Argument Filtering and Ordering
       →DP Problem 7
Nar


Dependency Pair:

QUOT(s(s(x''')), s(s(0))) -> QUOT(x''', s(s(0)))


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




The following dependency pair can be strictly oriented:

QUOT(s(s(x''')), s(s(0))) -> QUOT(x''', s(s(0)))


There are no usable rules for innermost 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:
QUOT(x1, x2) -> QUOT(x1, x2)
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
           →DP Problem 21
FwdInst
           →DP Problem 22
Nar
             ...
               →DP Problem 25
Argument Filtering and Ordering
       →DP Problem 7
Nar


Dependency Pair:

QUOT(s(s(s(x'))), s(s(s(y')))) -> QUOT(-(x', y'), s(s(s(y'))))


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




The following dependency pair can be strictly oriented:

QUOT(s(s(s(x'))), s(s(s(y')))) -> QUOT(-(x', y'), s(s(s(y'))))


The following usable rules for innermost can be oriented:

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


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
trivial

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


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Narrowing Transformation


Dependency Pair:

SUM(++(xs, :(x, :(y, ys)))) -> SUM(++(xs, sum(:(x, :(y, ys)))))


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

SUM(++(xs, :(x, :(y, ys)))) -> SUM(++(xs, sum(:(x, :(y, ys)))))
one new Dependency Pair is created:

SUM(++(xs, :(x'', :(y'', ys')))) -> SUM(++(xs, sum(:(+(x'', y''), ys'))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar
           →DP Problem 29
Narrowing Transformation


Dependency Pair:

SUM(++(xs, :(x'', :(y'', ys')))) -> SUM(++(xs, sum(:(+(x'', y''), ys'))))


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




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

SUM(++(xs, :(x'', :(y'', ys')))) -> SUM(++(xs, sum(:(+(x'', y''), ys'))))
four new Dependency Pairs are created:

SUM(++(xs, :(x''', :(y''', nil)))) -> SUM(++(xs, :(+(x''', y'''), nil)))
SUM(++(xs, :(x''', :(y''', :(y', xs''))))) -> SUM(++(xs, sum(:(+(+(x''', y'''), y'), xs''))))
SUM(++(xs, :(0, :(y''', ys')))) -> SUM(++(xs, sum(:(y''', ys'))))
SUM(++(xs, :(s(x'), :(y''', ys')))) -> SUM(++(xs, sum(:(s(+(x', y''')), ys'))))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

SUM(++(xs, :(s(x'), :(y''', ys')))) -> SUM(++(xs, sum(:(s(+(x', y''')), ys'))))
SUM(++(xs, :(0, :(y''', ys')))) -> SUM(++(xs, sum(:(y''', ys'))))
SUM(++(xs, :(x''', :(y''', :(y', xs''))))) -> SUM(++(xs, sum(:(+(+(x''', y'''), y'), xs''))))
SUM(++(xs, :(x''', :(y''', nil)))) -> SUM(++(xs, :(+(x''', y'''), nil)))


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

SUM(++(xs, :(s(x'), :(y''', ys')))) -> SUM(++(xs, sum(:(s(+(x', y''')), ys'))))
SUM(++(xs, :(0, :(y''', ys')))) -> SUM(++(xs, sum(:(y''', ys'))))
SUM(++(xs, :(x''', :(y''', :(y', xs''))))) -> SUM(++(xs, sum(:(+(+(x''', y'''), y'), xs''))))
SUM(++(xs, :(x''', :(y''', nil)))) -> SUM(++(xs, :(+(x''', y'''), nil)))


The following usable rules for innermost can be oriented:

++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
+(0, y) -> y
+(s(x), y) -> s(+(x, y))


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
++ > :

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


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
       →DP Problem 3
FwdInst
       →DP Problem 4
FwdInst
       →DP Problem 5
AFS
       →DP Problem 6
Nar
       →DP Problem 7
Nar
           →DP Problem 29
Nar
             ...
               →DP Problem 31
Dependency Graph


Dependency Pair:


Rules:


+(0, y) -> y
+(s(x), y) -> s(+(x, y))
++(nil, ys) -> ys
++(:(x, xs), ys) -> :(x, ++(xs, ys))
sum(:(x, nil)) -> :(x, nil)
sum(:(x, :(y, xs))) -> sum(:(+(x, y), xs))
sum(++(xs, :(x, :(y, ys)))) -> sum(++(xs, sum(:(x, :(y, ys)))))
-(x, 0) -> x
-(0, s(y)) -> 0
-(s(x), s(y)) -> -(x, y)
quot(0, s(y)) -> 0
quot(s(x), s(y)) -> s(quot(-(x, y), s(y)))
length(nil) -> 0
length(:(x, xs)) -> s(length(xs))
hd(:(x, xs)) -> x
avg(xs) -> quot(hd(sum(xs)), length(xs))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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