YES

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

The following DP Processors were used


Problem 1 was processed with processor DependencyGraph (74ms).
 | – Problem 2 was processed with processor SubtermCriterion (1ms).
 | – Problem 3 was processed with processor SubtermCriterion (1ms).
 | – Problem 4 was processed with processor SubtermCriterion (1ms).

Problem 1: DependencyGraph



Dependency Pair Problem

Dependency Pairs

rev#(++(x, y))++#(rev(y), rev(x))++#(++(x, y), z)++#(x, ++(y, z))
++#(++(x, y), z)++#(y, z)flatten#(++(x, y))flatten#(y)
flatten#(++(x, y))flatten#(x)flatten#(++(unit(x), y))++#(flatten(x), flatten(y))
flatten#(++(unit(x), y))flatten#(y)rev#(++(x, y))rev#(x)
rev#(++(x, y))rev#(y)flatten#(flatten(x))flatten#(x)
flatten#(++(x, y))++#(flatten(x), flatten(y))flatten#(unit(x))flatten#(x)
flatten#(++(unit(x), y))flatten#(x)

Rewrite Rules

flatten(nil)nilflatten(unit(x))flatten(x)
flatten(++(x, y))++(flatten(x), flatten(y))flatten(++(unit(x), y))++(flatten(x), flatten(y))
flatten(flatten(x))flatten(x)rev(nil)nil
rev(unit(x))unit(x)rev(++(x, y))++(rev(y), rev(x))
rev(rev(x))x++(x, nil)x
++(nil, y)y++(++(x, y), z)++(x, ++(y, z))

Original Signature

Termination of terms over the following signature is verified: unit, flatten, rev, ++, nil

Strategy


The following SCCs where found

rev#(++(x, y)) → rev#(x)rev#(++(x, y)) → rev#(y)

++#(++(x, y), z) → ++#(x, ++(y, z))++#(++(x, y), z) → ++#(y, z)

flatten#(++(unit(x), y)) → flatten#(y)flatten#(flatten(x)) → flatten#(x)
flatten#(++(x, y)) → flatten#(y)flatten#(unit(x)) → flatten#(x)
flatten#(++(x, y)) → flatten#(x)flatten#(++(unit(x), y)) → flatten#(x)

Problem 2: SubtermCriterion



Dependency Pair Problem

Dependency Pairs

rev#(++(x, y))rev#(x)rev#(++(x, y))rev#(y)

Rewrite Rules

flatten(nil)nilflatten(unit(x))flatten(x)
flatten(++(x, y))++(flatten(x), flatten(y))flatten(++(unit(x), y))++(flatten(x), flatten(y))
flatten(flatten(x))flatten(x)rev(nil)nil
rev(unit(x))unit(x)rev(++(x, y))++(rev(y), rev(x))
rev(rev(x))x++(x, nil)x
++(nil, y)y++(++(x, y), z)++(x, ++(y, z))

Original Signature

Termination of terms over the following signature is verified: unit, flatten, rev, ++, nil

Strategy


Projection

The following projection was used:

Thus, the following dependency pairs are removed:

rev#(++(x, y))rev#(x)rev#(++(x, y))rev#(y)

Problem 3: SubtermCriterion



Dependency Pair Problem

Dependency Pairs

++#(++(x, y), z)++#(x, ++(y, z))++#(++(x, y), z)++#(y, z)

Rewrite Rules

flatten(nil)nilflatten(unit(x))flatten(x)
flatten(++(x, y))++(flatten(x), flatten(y))flatten(++(unit(x), y))++(flatten(x), flatten(y))
flatten(flatten(x))flatten(x)rev(nil)nil
rev(unit(x))unit(x)rev(++(x, y))++(rev(y), rev(x))
rev(rev(x))x++(x, nil)x
++(nil, y)y++(++(x, y), z)++(x, ++(y, z))

Original Signature

Termination of terms over the following signature is verified: unit, flatten, rev, ++, nil

Strategy


Projection

The following projection was used:

Thus, the following dependency pairs are removed:

++#(++(x, y), z)++#(x, ++(y, z))++#(++(x, y), z)++#(y, z)

Problem 4: SubtermCriterion



Dependency Pair Problem

Dependency Pairs

flatten#(++(unit(x), y))flatten#(y)flatten#(flatten(x))flatten#(x)
flatten#(++(x, y))flatten#(y)flatten#(unit(x))flatten#(x)
flatten#(++(x, y))flatten#(x)flatten#(++(unit(x), y))flatten#(x)

Rewrite Rules

flatten(nil)nilflatten(unit(x))flatten(x)
flatten(++(x, y))++(flatten(x), flatten(y))flatten(++(unit(x), y))++(flatten(x), flatten(y))
flatten(flatten(x))flatten(x)rev(nil)nil
rev(unit(x))unit(x)rev(++(x, y))++(rev(y), rev(x))
rev(rev(x))x++(x, nil)x
++(nil, y)y++(++(x, y), z)++(x, ++(y, z))

Original Signature

Termination of terms over the following signature is verified: unit, flatten, rev, ++, nil

Strategy


Projection

The following projection was used:

Thus, the following dependency pairs are removed:

flatten#(++(unit(x), y))flatten#(y)flatten#(flatten(x))flatten#(x)
flatten#(++(x, y))flatten#(y)flatten#(unit(x))flatten#(x)
flatten#(++(x, y))flatten#(x)flatten#(++(unit(x), y))flatten#(x)