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))

Innermost Termination of R to be shown.



   R
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
DPs
       →DP Problem 1
Instantiation Transformation


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




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

IFAPPEND(l1, l2, cons(x, l)) -> APPEND(l, l2)
one new Dependency Pair is created:

IFAPPEND(cons(x', l'), l2'', cons(x', l')) -> APPEND(l', l2'')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Inst
           →DP Problem 2
Forward Instantiation Transformation


Dependency Pairs:

IFAPPEND(cons(x', l'), 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




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

APPEND(l1, l2) -> IFAPPEND(l1, l2, l1)
one new Dependency Pair is created:

APPEND(cons(x'''', l''''), l2') -> IFAPPEND(cons(x'''', l''''), l2', cons(x'''', l''''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Inst
           →DP Problem 2
FwdInst
             ...
               →DP Problem 3
Forward Instantiation Transformation


Dependency Pairs:

APPEND(cons(x'''', l''''), l2') -> IFAPPEND(cons(x'''', l''''), l2', cons(x'''', l''''))
IFAPPEND(cons(x', l'), l2'', cons(x', l')) -> APPEND(l', l2'')


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




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

IFAPPEND(cons(x', l'), l2'', cons(x', l')) -> APPEND(l', l2'')
one new Dependency Pair is created:

IFAPPEND(cons(x', cons(x'''''', l'''''')), l2'''', cons(x', cons(x'''''', l''''''))) -> APPEND(cons(x'''''', l''''''), l2'''')

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Inst
           →DP Problem 2
FwdInst
             ...
               →DP Problem 4
Forward Instantiation Transformation


Dependency Pairs:

IFAPPEND(cons(x', cons(x'''''', l'''''')), l2'''', cons(x', cons(x'''''', l''''''))) -> APPEND(cons(x'''''', l''''''), l2'''')
APPEND(cons(x'''', l''''), l2') -> IFAPPEND(cons(x'''', l''''), l2', cons(x'''', l''''))


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




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

APPEND(cons(x'''', l''''), l2') -> IFAPPEND(cons(x'''', l''''), l2', cons(x'''', l''''))
one new Dependency Pair is created:

APPEND(cons(x''''', cons(x''''''''', l''''''''')), l2'') -> IFAPPEND(cons(x''''', cons(x''''''''', l''''''''')), l2'', cons(x''''', cons(x''''''''', l''''''''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Inst
           →DP Problem 2
FwdInst
             ...
               →DP Problem 5
Argument Filtering and Ordering


Dependency Pairs:

APPEND(cons(x''''', cons(x''''''''', l''''''''')), l2'') -> IFAPPEND(cons(x''''', cons(x''''''''', l''''''''')), l2'', cons(x''''', cons(x''''''''', l''''''''')))
IFAPPEND(cons(x', cons(x'''''', l'''''')), l2'''', cons(x', cons(x'''''', l''''''))) -> APPEND(cons(x'''''', l''''''), l2'''')


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




The following dependency pair can be strictly oriented:

IFAPPEND(cons(x', cons(x'''''', l'''''')), l2'''', cons(x', cons(x'''''', l''''''))) -> APPEND(cons(x'''''', l''''''), l2'''')


There are no usable rules for innermost that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(cons(x1, x2))=  1 + x1 + x2  

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


   R
DPs
       →DP Problem 1
Inst
           →DP Problem 2
FwdInst
             ...
               →DP Problem 6
Dependency Graph


Dependency Pair:

APPEND(cons(x''''', cons(x''''''''', l''''''''')), l2'') -> IFAPPEND(cons(x''''', cons(x''''''''', l''''''''')), l2'', cons(x''''', cons(x''''''''', l''''''''')))


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




Using the Dependency Graph resulted in no new DP problems.

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