YES

The TRS could be proven terminating. The proof took 178 ms.

The following DP Processors were used


Problem 1 was processed with processor DependencyGraph (49ms).
 | – Problem 2 was processed with processor SubtermCriterion (4ms).
 | – Problem 3 was processed with processor SubtermCriterion (1ms).
 | – Problem 4 was processed with processor SubtermCriterion (0ms).
 | – Problem 5 was processed with processor SubtermCriterion (1ms).
 | – Problem 6 was processed with processor SubtermCriterion (21ms).

Problem 1: DependencyGraph



Dependency Pair Problem

Dependency Pairs

sqr#(s(X))add#(sqr(X), dbl(X))add#(s(X), Y)add#(X, Y)
activate#(n__terms(X))terms#(X)first#(s(X), cons(Y, Z))activate#(Z)
dbl#(s(X))dbl#(X)half#(s(s(X)))half#(X)
terms#(N)sqr#(N)sqr#(s(X))dbl#(X)
activate#(n__first(X1, X2))first#(X1, X2)sqr#(s(X))sqr#(X)

Rewrite Rules

terms(N)cons(recip(sqr(N)), n__terms(s(N)))sqr(0)0
sqr(s(X))s(add(sqr(X), dbl(X)))dbl(0)0
dbl(s(X))s(s(dbl(X)))add(0, X)X
add(s(X), Y)s(add(X, Y))first(0, X)nil
first(s(X), cons(Y, Z))cons(Y, n__first(X, activate(Z)))half(0)0
half(s(0))0half(s(s(X)))s(half(X))
half(dbl(X))Xterms(X)n__terms(X)
first(X1, X2)n__first(X1, X2)activate(n__terms(X))terms(X)
activate(n__first(X1, X2))first(X1, X2)activate(X)X

Original Signature

Termination of terms over the following signature is verified: terms, sqr, half, dbl, recip, n__terms, add, activate, 0, s, n__first, first, nil, cons

Strategy


The following SCCs where found

add#(s(X), Y) → add#(X, Y)

dbl#(s(X)) → dbl#(X)

half#(s(s(X))) → half#(X)

first#(s(X), cons(Y, Z)) → activate#(Z)activate#(n__first(X1, X2)) → first#(X1, X2)

sqr#(s(X)) → sqr#(X)

Problem 2: SubtermCriterion



Dependency Pair Problem

Dependency Pairs

half#(s(s(X)))half#(X)

Rewrite Rules

terms(N)cons(recip(sqr(N)), n__terms(s(N)))sqr(0)0
sqr(s(X))s(add(sqr(X), dbl(X)))dbl(0)0
dbl(s(X))s(s(dbl(X)))add(0, X)X
add(s(X), Y)s(add(X, Y))first(0, X)nil
first(s(X), cons(Y, Z))cons(Y, n__first(X, activate(Z)))half(0)0
half(s(0))0half(s(s(X)))s(half(X))
half(dbl(X))Xterms(X)n__terms(X)
first(X1, X2)n__first(X1, X2)activate(n__terms(X))terms(X)
activate(n__first(X1, X2))first(X1, X2)activate(X)X

Original Signature

Termination of terms over the following signature is verified: terms, sqr, half, dbl, recip, n__terms, add, activate, 0, s, n__first, first, nil, cons

Strategy


Projection

The following projection was used:

Thus, the following dependency pairs are removed:

half#(s(s(X)))half#(X)

Problem 3: SubtermCriterion



Dependency Pair Problem

Dependency Pairs

sqr#(s(X))sqr#(X)

Rewrite Rules

terms(N)cons(recip(sqr(N)), n__terms(s(N)))sqr(0)0
sqr(s(X))s(add(sqr(X), dbl(X)))dbl(0)0
dbl(s(X))s(s(dbl(X)))add(0, X)X
add(s(X), Y)s(add(X, Y))first(0, X)nil
first(s(X), cons(Y, Z))cons(Y, n__first(X, activate(Z)))half(0)0
half(s(0))0half(s(s(X)))s(half(X))
half(dbl(X))Xterms(X)n__terms(X)
first(X1, X2)n__first(X1, X2)activate(n__terms(X))terms(X)
activate(n__first(X1, X2))first(X1, X2)activate(X)X

Original Signature

Termination of terms over the following signature is verified: terms, sqr, half, dbl, recip, n__terms, add, activate, 0, s, n__first, first, nil, cons

Strategy


Projection

The following projection was used:

Thus, the following dependency pairs are removed:

sqr#(s(X))sqr#(X)

Problem 4: SubtermCriterion



Dependency Pair Problem

Dependency Pairs

add#(s(X), Y)add#(X, Y)

Rewrite Rules

terms(N)cons(recip(sqr(N)), n__terms(s(N)))sqr(0)0
sqr(s(X))s(add(sqr(X), dbl(X)))dbl(0)0
dbl(s(X))s(s(dbl(X)))add(0, X)X
add(s(X), Y)s(add(X, Y))first(0, X)nil
first(s(X), cons(Y, Z))cons(Y, n__first(X, activate(Z)))half(0)0
half(s(0))0half(s(s(X)))s(half(X))
half(dbl(X))Xterms(X)n__terms(X)
first(X1, X2)n__first(X1, X2)activate(n__terms(X))terms(X)
activate(n__first(X1, X2))first(X1, X2)activate(X)X

Original Signature

Termination of terms over the following signature is verified: terms, sqr, half, dbl, recip, n__terms, add, activate, 0, s, n__first, first, nil, cons

Strategy


Projection

The following projection was used:

Thus, the following dependency pairs are removed:

add#(s(X), Y)add#(X, Y)

Problem 5: SubtermCriterion



Dependency Pair Problem

Dependency Pairs

first#(s(X), cons(Y, Z))activate#(Z)activate#(n__first(X1, X2))first#(X1, X2)

Rewrite Rules

terms(N)cons(recip(sqr(N)), n__terms(s(N)))sqr(0)0
sqr(s(X))s(add(sqr(X), dbl(X)))dbl(0)0
dbl(s(X))s(s(dbl(X)))add(0, X)X
add(s(X), Y)s(add(X, Y))first(0, X)nil
first(s(X), cons(Y, Z))cons(Y, n__first(X, activate(Z)))half(0)0
half(s(0))0half(s(s(X)))s(half(X))
half(dbl(X))Xterms(X)n__terms(X)
first(X1, X2)n__first(X1, X2)activate(n__terms(X))terms(X)
activate(n__first(X1, X2))first(X1, X2)activate(X)X

Original Signature

Termination of terms over the following signature is verified: terms, sqr, half, dbl, recip, n__terms, add, activate, 0, s, n__first, first, nil, cons

Strategy


Projection

The following projection was used:

Thus, the following dependency pairs are removed:

first#(s(X), cons(Y, Z))activate#(Z)activate#(n__first(X1, X2))first#(X1, X2)

Problem 6: SubtermCriterion



Dependency Pair Problem

Dependency Pairs

dbl#(s(X))dbl#(X)

Rewrite Rules

terms(N)cons(recip(sqr(N)), n__terms(s(N)))sqr(0)0
sqr(s(X))s(add(sqr(X), dbl(X)))dbl(0)0
dbl(s(X))s(s(dbl(X)))add(0, X)X
add(s(X), Y)s(add(X, Y))first(0, X)nil
first(s(X), cons(Y, Z))cons(Y, n__first(X, activate(Z)))half(0)0
half(s(0))0half(s(s(X)))s(half(X))
half(dbl(X))Xterms(X)n__terms(X)
first(X1, X2)n__first(X1, X2)activate(n__terms(X))terms(X)
activate(n__first(X1, X2))first(X1, X2)activate(X)X

Original Signature

Termination of terms over the following signature is verified: terms, sqr, half, dbl, recip, n__terms, add, activate, 0, s, n__first, first, nil, cons

Strategy


Projection

The following projection was used:

Thus, the following dependency pairs are removed:

dbl#(s(X))dbl#(X)