Term Rewriting System R:
[x, l, l1, l2]
isempty(nil) -> true
isempty(cons(x, l)) -> false
hd(cons(x, l)) -> x
tl(cons(x, l)) -> l
append(l1, l2) -> ifappend(l1, l2, l1)
ifappend(l1, l2, nil) -> l2
ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2))
Termination of R to be shown.
R
↳Overlay and local confluence Check
The TRS is overlay and locally confluent (all critical pairs are trivially joinable).Hence, we can switch to innermost.
R
↳OC
→TRS2
↳Dependency Pair Analysis
R contains the following Dependency Pairs:
APPEND(l1, l2) -> IFAPPEND(l1, l2, l1)
IFAPPEND(l1, l2, cons(x, l)) -> APPEND(l, l2)
Furthermore, R contains one SCC.
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳Usable Rules (Innermost)
Dependency Pairs:
IFAPPEND(l1, l2, cons(x, l)) -> APPEND(l, l2)
APPEND(l1, l2) -> IFAPPEND(l1, l2, l1)
Rules:
isempty(nil) -> true
isempty(cons(x, l)) -> false
hd(cons(x, l)) -> x
tl(cons(x, l)) -> l
append(l1, l2) -> ifappend(l1, l2, l1)
ifappend(l1, l2, nil) -> l2
ifappend(l1, l2, cons(x, l)) -> cons(x, append(l, l2))
Strategy:
innermost
As we are in the innermost case, we can delete all 7 non-usable-rules.
R
↳OC
→TRS2
↳DPs
→DP Problem 1
↳UsableRules
...
→DP Problem 2
↳Size-Change Principle
Dependency Pairs:
IFAPPEND(l1, l2, cons(x, l)) -> APPEND(l, l2)
APPEND(l1, l2) -> IFAPPEND(l1, l2, l1)
Rule:
none
Strategy:
innermost
We number the DPs as follows:
- IFAPPEND(l1, l2, cons(x, l)) -> APPEND(l, l2)
- APPEND(l1, l2) -> IFAPPEND(l1, l2, l1)
and get the following Size-Change Graph(s):
which lead(s) to this/these maximal multigraph(s):
DP: empty set
Oriented Rules: none
We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial
with Argument Filtering System:
cons(x1, x2) -> cons(x1, x2)
We obtain no new DP problems.
Termination of R successfully shown.
Duration:
0:00 minutes