Term Rewriting System R:
[ys, x, xs, f]
app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) -> app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) -> app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) -> nil
app(app(flatwithsub, f), app(app(cons, x), xs)) -> app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(cons, x), app(app(append, xs), ys))
APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(append, xs), ys)
APP(app(append, app(app(cons, x), xs)), ys) -> APP(append, xs)
APP(app(flatwith, f), app(leaf, x)) -> APP(app(cons, app(f, x)), nil)
APP(app(flatwith, f), app(leaf, x)) -> APP(cons, app(f, x))
APP(app(flatwith, f), app(leaf, x)) -> APP(f, x)
APP(app(flatwith, f), app(node, xs)) -> APP(app(flatwithsub, f), xs)
APP(app(flatwith, f), app(node, xs)) -> APP(flatwithsub, f)
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(append, app(app(flatwith, f), x))
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwith, f), x)
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(flatwith, f)
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwithsub, f), xs)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwith, f), x)
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))
APP(app(flatwith, f), app(node, xs)) -> APP(app(flatwithsub, f), xs)
APP(app(flatwith, f), app(leaf, x)) -> APP(f, x)
APP(app(flatwith, f), app(leaf, x)) -> APP(app(cons, app(f, x)), nil)
APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(append, xs), ys)


Rules:


app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) -> app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) -> app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) -> nil
app(app(flatwithsub, f), app(app(cons, x), xs)) -> app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))


Strategy:

innermost




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

APP(app(flatwith, f), app(leaf, x)) -> APP(app(cons, app(f, x)), nil)
six new Dependency Pairs are created:

APP(app(flatwith, app(append, nil)), app(leaf, x')) -> APP(app(cons, x'), nil)
APP(app(flatwith, app(append, app(app(cons, x''), xs'))), app(leaf, x0)) -> APP(app(cons, app(app(cons, x''), app(app(append, xs'), x0))), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(leaf, x''))) -> APP(app(cons, app(app(cons, app(f'', x'')), nil)), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(node, xs'))) -> APP(app(cons, app(app(flatwithsub, f''), xs')), nil)
APP(app(flatwith, app(flatwithsub, f'')), app(leaf, nil)) -> APP(app(cons, nil), nil)
APP(app(flatwith, app(flatwithsub, f'')), app(leaf, app(app(cons, x''), xs'))) -> APP(app(cons, app(app(append, app(app(flatwith, f''), x'')), app(app(flatwithsub, f''), xs'))), nil)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Narrowing Transformation


Dependency Pairs:

APP(app(flatwith, app(flatwithsub, f'')), app(leaf, app(app(cons, x''), xs'))) -> APP(app(cons, app(app(append, app(app(flatwith, f''), x'')), app(app(flatwithsub, f''), xs'))), nil)
APP(app(flatwith, app(flatwithsub, f'')), app(leaf, nil)) -> APP(app(cons, nil), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(node, xs'))) -> APP(app(cons, app(app(flatwithsub, f''), xs')), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(leaf, x''))) -> APP(app(cons, app(app(cons, app(f'', x'')), nil)), nil)
APP(app(flatwith, app(append, app(app(cons, x''), xs'))), app(leaf, x0)) -> APP(app(cons, app(app(cons, x''), app(app(append, xs'), x0))), nil)
APP(app(flatwith, app(append, nil)), app(leaf, x')) -> APP(app(cons, x'), nil)
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwith, f), x)
APP(app(flatwith, f), app(node, xs)) -> APP(app(flatwithsub, f), xs)
APP(app(flatwith, f), app(leaf, x)) -> APP(f, x)
APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(append, xs), ys)
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwithsub, f), xs)


Rules:


app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) -> app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) -> app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) -> nil
app(app(flatwithsub, f), app(app(cons, x), xs)) -> app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))


Strategy:

innermost




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

APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))
four new Dependency Pairs are created:

APP(app(flatwithsub, f''), app(app(cons, app(leaf, x'')), xs)) -> APP(app(append, app(app(cons, app(f'', x'')), nil)), app(app(flatwithsub, f''), xs))
APP(app(flatwithsub, f''), app(app(cons, app(node, xs'')), xs)) -> APP(app(append, app(app(flatwithsub, f''), xs'')), app(app(flatwithsub, f''), xs))
APP(app(flatwithsub, f''), app(app(cons, x), nil)) -> APP(app(append, app(app(flatwith, f''), x)), nil)
APP(app(flatwithsub, f''), app(app(cons, x), app(app(cons, x''), xs''))) -> APP(app(append, app(app(flatwith, f''), x)), app(app(append, app(app(flatwith, f''), x'')), app(app(flatwithsub, f''), xs'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 3
Narrowing Transformation


Dependency Pairs:

APP(app(flatwithsub, f''), app(app(cons, x), app(app(cons, x''), xs''))) -> APP(app(append, app(app(flatwith, f''), x)), app(app(append, app(app(flatwith, f''), x'')), app(app(flatwithsub, f''), xs'')))
APP(app(flatwithsub, f''), app(app(cons, x), nil)) -> APP(app(append, app(app(flatwith, f''), x)), nil)
APP(app(flatwithsub, f''), app(app(cons, app(node, xs'')), xs)) -> APP(app(append, app(app(flatwithsub, f''), xs'')), app(app(flatwithsub, f''), xs))
APP(app(flatwith, app(flatwithsub, f'')), app(leaf, nil)) -> APP(app(cons, nil), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(node, xs'))) -> APP(app(cons, app(app(flatwithsub, f''), xs')), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(leaf, x''))) -> APP(app(cons, app(app(cons, app(f'', x'')), nil)), nil)
APP(app(flatwith, app(append, app(app(cons, x''), xs'))), app(leaf, x0)) -> APP(app(cons, app(app(cons, x''), app(app(append, xs'), x0))), nil)
APP(app(flatwith, app(append, nil)), app(leaf, x')) -> APP(app(cons, x'), nil)
APP(app(flatwithsub, f''), app(app(cons, app(leaf, x'')), xs)) -> APP(app(append, app(app(cons, app(f'', x'')), nil)), app(app(flatwithsub, f''), xs))
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwith, f), x)
APP(app(flatwith, f), app(node, xs)) -> APP(app(flatwithsub, f), xs)
APP(app(flatwith, f), app(leaf, x)) -> APP(f, x)
APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(append, xs), ys)
APP(app(flatwith, app(flatwithsub, f'')), app(leaf, app(app(cons, x''), xs'))) -> APP(app(cons, app(app(append, app(app(flatwith, f''), x'')), app(app(flatwithsub, f''), xs'))), nil)


Rules:


app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) -> app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) -> app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) -> nil
app(app(flatwithsub, f), app(app(cons, x), xs)) -> app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))


Strategy:

innermost




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

APP(app(flatwith, app(append, nil)), app(leaf, x')) -> APP(app(cons, x'), nil)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 4
Narrowing Transformation


Dependency Pairs:

APP(app(flatwithsub, f''), app(app(cons, x), nil)) -> APP(app(append, app(app(flatwith, f''), x)), nil)
APP(app(flatwithsub, f''), app(app(cons, app(node, xs'')), xs)) -> APP(app(append, app(app(flatwithsub, f''), xs'')), app(app(flatwithsub, f''), xs))
APP(app(flatwith, app(flatwithsub, f'')), app(leaf, app(app(cons, x''), xs'))) -> APP(app(cons, app(app(append, app(app(flatwith, f''), x'')), app(app(flatwithsub, f''), xs'))), nil)
APP(app(flatwith, app(flatwithsub, f'')), app(leaf, nil)) -> APP(app(cons, nil), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(node, xs'))) -> APP(app(cons, app(app(flatwithsub, f''), xs')), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(leaf, x''))) -> APP(app(cons, app(app(cons, app(f'', x'')), nil)), nil)
APP(app(flatwith, app(append, app(app(cons, x''), xs'))), app(leaf, x0)) -> APP(app(cons, app(app(cons, x''), app(app(append, xs'), x0))), nil)
APP(app(flatwithsub, f''), app(app(cons, app(leaf, x'')), xs)) -> APP(app(append, app(app(cons, app(f'', x'')), nil)), app(app(flatwithsub, f''), xs))
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwith, f), x)
APP(app(flatwith, f), app(node, xs)) -> APP(app(flatwithsub, f), xs)
APP(app(flatwith, f), app(leaf, x)) -> APP(f, x)
APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(append, xs), ys)
APP(app(flatwithsub, f''), app(app(cons, x), app(app(cons, x''), xs''))) -> APP(app(append, app(app(flatwith, f''), x)), app(app(append, app(app(flatwith, f''), x'')), app(app(flatwithsub, f''), xs'')))


Rules:


app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) -> app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) -> app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) -> nil
app(app(flatwithsub, f), app(app(cons, x), xs)) -> app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))


Strategy:

innermost




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

APP(app(flatwith, app(flatwithsub, f'')), app(leaf, nil)) -> APP(app(cons, nil), nil)
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 5
Forward Instantiation Transformation


Dependency Pairs:

APP(app(flatwithsub, f''), app(app(cons, x), app(app(cons, x''), xs''))) -> APP(app(append, app(app(flatwith, f''), x)), app(app(append, app(app(flatwith, f''), x'')), app(app(flatwithsub, f''), xs'')))
APP(app(flatwithsub, f''), app(app(cons, app(node, xs'')), xs)) -> APP(app(append, app(app(flatwithsub, f''), xs'')), app(app(flatwithsub, f''), xs))
APP(app(flatwith, app(flatwithsub, f'')), app(leaf, app(app(cons, x''), xs'))) -> APP(app(cons, app(app(append, app(app(flatwith, f''), x'')), app(app(flatwithsub, f''), xs'))), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(node, xs'))) -> APP(app(cons, app(app(flatwithsub, f''), xs')), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(leaf, x''))) -> APP(app(cons, app(app(cons, app(f'', x'')), nil)), nil)
APP(app(flatwith, app(append, app(app(cons, x''), xs'))), app(leaf, x0)) -> APP(app(cons, app(app(cons, x''), app(app(append, xs'), x0))), nil)
APP(app(flatwithsub, f''), app(app(cons, app(leaf, x'')), xs)) -> APP(app(append, app(app(cons, app(f'', x'')), nil)), app(app(flatwithsub, f''), xs))
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwith, f), x)
APP(app(flatwith, f), app(node, xs)) -> APP(app(flatwithsub, f), xs)
APP(app(flatwith, f), app(leaf, x)) -> APP(f, x)
APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(append, xs), ys)
APP(app(flatwithsub, f''), app(app(cons, x), nil)) -> APP(app(append, app(app(flatwith, f''), x)), nil)


Rules:


app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) -> app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) -> app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) -> nil
app(app(flatwithsub, f), app(app(cons, x), xs)) -> app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))


Strategy:

innermost




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

APP(app(flatwith, f), app(leaf, x)) -> APP(f, x)
12 new Dependency Pairs are created:

APP(app(flatwith, app(flatwith, f'')), app(leaf, app(leaf, x''))) -> APP(app(flatwith, f''), app(leaf, x''))
APP(app(flatwith, app(append, app(app(cons, x''), xs''))), app(leaf, x0)) -> APP(app(append, app(app(cons, x''), xs'')), x0)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(node, xs''))) -> APP(app(flatwith, f''), app(node, xs''))
APP(app(flatwith, app(flatwithsub, f'')), app(leaf, app(app(cons, x''), xs''))) -> APP(app(flatwithsub, f''), app(app(cons, x''), xs''))
APP(app(flatwith, app(flatwith, app(append, app(app(cons, x''''), xs''')))), app(leaf, app(leaf, x0''))) -> APP(app(flatwith, app(append, app(app(cons, x''''), xs'''))), app(leaf, x0''))
APP(app(flatwith, app(flatwith, app(flatwith, f''''))), app(leaf, app(leaf, app(leaf, x'''')))) -> APP(app(flatwith, app(flatwith, f'''')), app(leaf, app(leaf, x'''')))
APP(app(flatwith, app(flatwith, app(flatwith, f''''))), app(leaf, app(leaf, app(node, xs''')))) -> APP(app(flatwith, app(flatwith, f'''')), app(leaf, app(node, xs''')))
APP(app(flatwith, app(flatwith, app(flatwithsub, f''''))), app(leaf, app(leaf, app(app(cons, x''''), xs''')))) -> APP(app(flatwith, app(flatwithsub, f'''')), app(leaf, app(app(cons, x''''), xs''')))
APP(app(flatwith, app(flatwithsub, f'''')), app(leaf, app(app(cons, app(leaf, x'''')), xs''))) -> APP(app(flatwithsub, f''''), app(app(cons, app(leaf, x'''')), xs''))
APP(app(flatwith, app(flatwithsub, f'''')), app(leaf, app(app(cons, app(node, xs'''')), xs''))) -> APP(app(flatwithsub, f''''), app(app(cons, app(node, xs'''')), xs''))
APP(app(flatwith, app(flatwithsub, f'''')), app(leaf, app(app(cons, x''), nil))) -> APP(app(flatwithsub, f''''), app(app(cons, x''), nil))
APP(app(flatwith, app(flatwithsub, f'''')), app(leaf, app(app(cons, x''), app(app(cons, x''''), xs'''')))) -> APP(app(flatwithsub, f''''), app(app(cons, x''), app(app(cons, x''''), xs'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 6
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

APP(app(flatwith, app(flatwithsub, f'''')), app(leaf, app(app(cons, x''), app(app(cons, x''''), xs'''')))) -> APP(app(flatwithsub, f''''), app(app(cons, x''), app(app(cons, x''''), xs'''')))
APP(app(flatwith, app(flatwithsub, f'''')), app(leaf, app(app(cons, x''), nil))) -> APP(app(flatwithsub, f''''), app(app(cons, x''), nil))
APP(app(flatwith, app(flatwithsub, f'''')), app(leaf, app(app(cons, app(node, xs'''')), xs''))) -> APP(app(flatwithsub, f''''), app(app(cons, app(node, xs'''')), xs''))
APP(app(flatwith, app(flatwithsub, f'''')), app(leaf, app(app(cons, app(leaf, x'''')), xs''))) -> APP(app(flatwithsub, f''''), app(app(cons, app(leaf, x'''')), xs''))
APP(app(flatwith, app(flatwith, app(flatwithsub, f''''))), app(leaf, app(leaf, app(app(cons, x''''), xs''')))) -> APP(app(flatwith, app(flatwithsub, f'''')), app(leaf, app(app(cons, x''''), xs''')))
APP(app(flatwith, app(flatwith, app(flatwith, f''''))), app(leaf, app(leaf, app(node, xs''')))) -> APP(app(flatwith, app(flatwith, f'''')), app(leaf, app(node, xs''')))
APP(app(flatwith, app(flatwith, app(flatwith, f''''))), app(leaf, app(leaf, app(leaf, x'''')))) -> APP(app(flatwith, app(flatwith, f'''')), app(leaf, app(leaf, x'''')))
APP(app(flatwith, app(flatwith, app(append, app(app(cons, x''''), xs''')))), app(leaf, app(leaf, x0''))) -> APP(app(flatwith, app(append, app(app(cons, x''''), xs'''))), app(leaf, x0''))
APP(app(flatwith, app(flatwithsub, f'')), app(leaf, app(app(cons, x''), xs''))) -> APP(app(flatwithsub, f''), app(app(cons, x''), xs''))
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(node, xs''))) -> APP(app(flatwith, f''), app(node, xs''))
APP(app(flatwith, app(append, app(app(cons, x''), xs''))), app(leaf, x0)) -> APP(app(append, app(app(cons, x''), xs'')), x0)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(leaf, x''))) -> APP(app(flatwith, f''), app(leaf, x''))
APP(app(flatwithsub, f''), app(app(cons, x), nil)) -> APP(app(append, app(app(flatwith, f''), x)), nil)
APP(app(flatwithsub, f''), app(app(cons, app(node, xs'')), xs)) -> APP(app(append, app(app(flatwithsub, f''), xs'')), app(app(flatwithsub, f''), xs))
APP(app(flatwith, app(flatwithsub, f'')), app(leaf, app(app(cons, x''), xs'))) -> APP(app(cons, app(app(append, app(app(flatwith, f''), x'')), app(app(flatwithsub, f''), xs'))), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(node, xs'))) -> APP(app(cons, app(app(flatwithsub, f''), xs')), nil)
APP(app(flatwith, app(flatwith, f'')), app(leaf, app(leaf, x''))) -> APP(app(cons, app(app(cons, app(f'', x'')), nil)), nil)
APP(app(flatwith, app(append, app(app(cons, x''), xs'))), app(leaf, x0)) -> APP(app(cons, app(app(cons, x''), app(app(append, xs'), x0))), nil)
APP(app(flatwithsub, f''), app(app(cons, app(leaf, x'')), xs)) -> APP(app(append, app(app(cons, app(f'', x'')), nil)), app(app(flatwithsub, f''), xs))
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) -> APP(app(flatwith, f), x)
APP(app(flatwith, f), app(node, xs)) -> APP(app(flatwithsub, f), xs)
APP(app(append, app(app(cons, x), xs)), ys) -> APP(app(append, xs), ys)
APP(app(flatwithsub, f''), app(app(cons, x), app(app(cons, x''), xs''))) -> APP(app(append, app(app(flatwith, f''), x)), app(app(append, app(app(flatwith, f''), x'')), app(app(flatwithsub, f''), xs'')))


Rules:


app(app(append, nil), ys) -> ys
app(app(append, app(app(cons, x), xs)), ys) -> app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) -> app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) -> app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) -> nil
app(app(flatwithsub, f), app(app(cons, x), xs)) -> app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))


Strategy:

innermost



Innermost Termination of R could not be shown.
Duration:
0:37 minutes