Term Rewriting System R:
[l, h, t, f, l1, l2, l3]
app(app(append, nil), l) -> l
app(app(append, app(app(cons, h), t)), l) -> app(app(cons, h), app(app(append, t), l))
app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, h), t)) -> app(app(cons, app(f, h)), app(app(map, f), t))
app(app(append, app(app(append, l1), l2)), l3) -> app(app(append, l1), app(app(append, l2), l3))
app(app(map, f), app(app(append, l1), l2)) -> app(app(append, app(app(map, f), l1)), app(app(map, f), l2))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(append, app(app(cons, h), t)), l) -> APP(app(cons, h), app(app(append, t), l))
APP(app(append, app(app(cons, h), t)), l) -> APP(app(append, t), l)
APP(app(append, app(app(cons, h), t)), l) -> APP(append, t)
APP(app(map, f), app(app(cons, h), t)) -> APP(app(cons, app(f, h)), app(app(map, f), t))
APP(app(map, f), app(app(cons, h), t)) -> APP(cons, app(f, h))
APP(app(map, f), app(app(cons, h), t)) -> APP(f, h)
APP(app(map, f), app(app(cons, h), t)) -> APP(app(map, f), t)
APP(app(append, app(app(append, l1), l2)), l3) -> APP(app(append, l1), app(app(append, l2), l3))
APP(app(append, app(app(append, l1), l2)), l3) -> APP(app(append, l2), l3)
APP(app(append, app(app(append, l1), l2)), l3) -> APP(append, l2)
APP(app(map, f), app(app(append, l1), l2)) -> APP(app(append, app(app(map, f), l1)), app(app(map, f), l2))
APP(app(map, f), app(app(append, l1), l2)) -> APP(append, app(app(map, f), l1))
APP(app(map, f), app(app(append, l1), l2)) -> APP(app(map, f), l1)
APP(app(map, f), app(app(append, l1), l2)) -> APP(app(map, f), l2)

Furthermore, R contains two SCCs.


   R
DPs
       →DP Problem 1
Size-Change Principle
       →DP Problem 2
SCP


Dependency Pairs:

APP(app(append, app(app(append, l1), l2)), l3) -> APP(app(append, l2), l3)
APP(app(append, app(app(append, l1), l2)), l3) -> APP(app(append, l1), app(app(append, l2), l3))
APP(app(append, app(app(cons, h), t)), l) -> APP(app(append, t), l)


Rules:


app(app(append, nil), l) -> l
app(app(append, app(app(cons, h), t)), l) -> app(app(cons, h), app(app(append, t), l))
app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, h), t)) -> app(app(cons, app(f, h)), app(app(map, f), t))
app(app(append, app(app(append, l1), l2)), l3) -> app(app(append, l1), app(app(append, l2), l3))
app(app(map, f), app(app(append, l1), l2)) -> app(app(append, app(app(map, f), l1)), app(app(map, f), l2))





The original DP problem is in applicative form. Its DPs and usable rules are the following.

APP(app(append, app(app(append, l1), l2)), l3) -> APP(app(append, l2), l3)
APP(app(append, app(app(append, l1), l2)), l3) -> APP(app(append, l1), app(app(append, l2), l3))
APP(app(append, app(app(cons, h), t)), l) -> APP(app(append, t), l)


app(app(append, nil), l) -> l
app(app(append, app(app(cons, h), t)), l) -> app(app(cons, h), app(app(append, t), l))
app(app(append, app(app(append, l1), l2)), l3) -> app(app(append, l1), app(app(append, l2), l3))


It is proper and hence, it can be A-transformed which results in the DP problem

APPEND(append(l1, l2), l3) -> APPEND(l2, l3)
APPEND(append(l1, l2), l3) -> APPEND(l1, append(l2, l3))
APPEND(cons(h, t), l) -> APPEND(t, l)


append(nil, l) -> l
append(cons(h, t), l) -> cons(h, append(t, l))
append(append(l1, l2), l3) -> append(l1, append(l2, l3))


We number the DPs as follows:
  1. APPEND(append(l1, l2), l3) -> APPEND(l2, l3)
  2. APPEND(append(l1, l2), l3) -> APPEND(l1, append(l2, l3))
  3. APPEND(cons(h, t), l) -> APPEND(t, l)
and get the following Size-Change Graph(s):
{1, 2, 3} , {1, 2, 3}
1>1
2=2
{1, 2, 3} , {1, 2, 3}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2, 3} , {1, 2, 3}
1>1
{1, 2, 3} , {1, 2, 3}
1>1
2=2

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.


   R
DPs
       →DP Problem 1
SCP
       →DP Problem 2
Size-Change Principle


Dependency Pairs:

APP(app(map, f), app(app(append, l1), l2)) -> APP(app(map, f), l2)
APP(app(map, f), app(app(append, l1), l2)) -> APP(app(map, f), l1)
APP(app(map, f), app(app(cons, h), t)) -> APP(app(map, f), t)
APP(app(map, f), app(app(cons, h), t)) -> APP(f, h)


Rules:


app(app(append, nil), l) -> l
app(app(append, app(app(cons, h), t)), l) -> app(app(cons, h), app(app(append, t), l))
app(app(map, f), nil) -> nil
app(app(map, f), app(app(cons, h), t)) -> app(app(cons, app(f, h)), app(app(map, f), t))
app(app(append, app(app(append, l1), l2)), l3) -> app(app(append, l1), app(app(append, l2), l3))
app(app(map, f), app(app(append, l1), l2)) -> app(app(append, app(app(map, f), l1)), app(app(map, f), l2))





We number the DPs as follows:
  1. APP(app(map, f), app(app(append, l1), l2)) -> APP(app(map, f), l2)
  2. APP(app(map, f), app(app(append, l1), l2)) -> APP(app(map, f), l1)
  3. APP(app(map, f), app(app(cons, h), t)) -> APP(app(map, f), t)
  4. APP(app(map, f), app(app(cons, h), t)) -> APP(f, h)
and get the following Size-Change Graph(s):
{4, 3, 2, 1} , {4, 3, 2, 1}
1=1
2>2
{4, 3, 2, 1} , {4, 3, 2, 1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{4, 3, 2, 1} , {4, 3, 2, 1}
1=1
2>2
{4, 3, 2, 1} , {4, 3, 2, 1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
trivial

We obtain no new DP problems.

Termination of R successfully shown.
Duration:
0:00 minutes