Term Rewriting System R:
[x, y, z]
ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Innermost Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

AP(ap(ap(g, x), y), ap(s, z)) -> AP(ap(ap(g, x), y), ap(ap(x, y), 0))
AP(ap(ap(g, x), y), ap(s, z)) -> AP(ap(x, y), 0)
AP(ap(ap(g, x), y), ap(s, z)) -> AP(x, y)

Furthermore, R contains one SCC.

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Narrowing Transformation`

Dependency Pairs:

AP(ap(ap(g, x), y), ap(s, z)) -> AP(x, y)
AP(ap(ap(g, x), y), ap(s, z)) -> AP(ap(ap(g, x), y), ap(ap(x, y), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, x), y), ap(s, z)) -> AP(ap(ap(g, x), y), ap(ap(x, y), 0))
two new Dependency Pairs are created:

AP(ap(ap(g, f), y'), ap(s, z)) -> AP(ap(ap(g, f), y'), ap(y', 0))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0))

The transformation is resulting in one new DP problem:

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

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0))
AP(ap(ap(g, f), y'), ap(s, z)) -> AP(ap(ap(g, f), y'), ap(y', 0))
AP(ap(ap(g, x), y), ap(s, z)) -> AP(x, y)

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0))
two new Dependency Pairs are created:

AP(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'')), ap(ap(ap(ap(g, f), y'''), ap(y''', 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z''')), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 3`
`                 ↳Forward Instantiation Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z''')), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'')), ap(ap(ap(ap(g, f), y'''), ap(y''', 0)), 0))
AP(ap(ap(g, x), y), ap(s, z)) -> AP(x, y)
AP(ap(ap(g, f), y'), ap(s, z)) -> AP(ap(ap(g, f), y'), ap(y', 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, x), y), ap(s, z)) -> AP(x, y)
four new Dependency Pairs are created:

AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, f), y'''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))

The transformation is resulting in two new DP problems:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 29`
`                 ↳Remaining Obligation(s)`

The following remains to be proven:
• Dependency Pair:

AP(ap(ap(g, f), y'), ap(s, z)) -> AP(ap(ap(g, f), y'), ap(y', 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

• Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1)), ap(ap(ap(ap(g, f), y''), ap(y'', 0)), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1)), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 5`
`                 ↳Narrowing Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'')), ap(ap(ap(ap(g, f), y'''), ap(y''', 0)), 0))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z''')), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'')), ap(ap(ap(ap(g, f), y'''), ap(y''', 0)), 0))
two new Dependency Pairs are created:

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0))
AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(ap(ap(ap(g, f), f), 0), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 6`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(ap(ap(ap(g, f), f), 0), 0))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z''')), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 7`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z''')), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(ap(ap(ap(g, f), f), 0), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 8`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0))
AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(ap(ap(ap(g, f), f), 0), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z''')), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 9`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z''')), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(ap(ap(ap(g, f), f), 0), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 10`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0))
AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(ap(ap(ap(g, f), f), 0), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z''')), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 11`
`                 ↳Narrowing Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z''')), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(ap(ap(ap(g, f), f), 0), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z''')), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0))
two new Dependency Pairs are created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), y'')), ap(s, z''')), ap(ap(ap(ap(g, f), y''), ap(y'', 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 12`
`                 ↳Narrowing Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), y'')), ap(s, z''')), ap(ap(ap(ap(g, f), y''), ap(y'', 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(ap(ap(ap(g, f), f), 0), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), f)), ap(s, z'')), ap(ap(ap(ap(g, f), f), 0), 0))
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 13`
`                 ↳Narrowing Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), y'')), ap(s, z''')), ap(ap(ap(ap(g, f), y''), ap(y'', 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), y'')), ap(s, z''')), ap(ap(ap(ap(g, f), y''), ap(y'', 0)), 0)), 0))
two new Dependency Pairs are created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z''')), ap(ap(ap(ap(g, f), f), 0), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 14`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z''')), ap(ap(ap(ap(g, f), f), 0), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 15`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z''')), ap(ap(ap(ap(g, f), f), 0), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 16`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z''')), ap(ap(ap(ap(g, f), f), 0), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 17`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z''')), ap(ap(ap(ap(g, f), f), 0), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 18`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z''')), ap(ap(ap(ap(g, f), f), 0), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 19`
`                 ↳Narrowing Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z''')), ap(ap(ap(ap(g, f), f), 0), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'0)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0))
two new Dependency Pairs are created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0)), ap(ap(ap(ap(g, f), y'''), ap(y''', 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1)), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 20`
`                 ↳Narrowing Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1)), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0)), ap(ap(ap(ap(g, f), y'''), ap(y''', 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z''')), ap(ap(ap(ap(g, f), f), 0), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z''')), ap(ap(ap(ap(g, f), f), 0), 0)), 0))
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 21`
`                 ↳Narrowing Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0)), ap(ap(ap(ap(g, f), y'''), ap(y''', 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1)), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), y''')), ap(s, z'0)), ap(ap(ap(ap(g, f), y'''), ap(y''', 0)), 0)), 0)), 0))
two new Dependency Pairs are created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z'0)), ap(ap(ap(ap(g, f), f), 0), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 22`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z'0)), ap(ap(ap(ap(g, f), f), 0), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1)), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 23`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1)), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z'0)), ap(ap(ap(ap(g, f), f), 0), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 24`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z'0)), ap(ap(ap(ap(g, f), f), 0), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1)), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 25`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1)), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z'0)), ap(ap(ap(ap(g, f), f), 0), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 26`
`                 ↳Rewriting Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z'0)), ap(ap(ap(ap(g, f), f), 0), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1)), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(ap(f, s), 0)), 0)), 0)), 0))
one new Dependency Pair is created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 27`
`                 ↳Narrowing Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1)), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z'0)), ap(ap(ap(ap(g, f), f), 0), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, x'), y')), ap(s, z'1)), ap(ap(ap(ap(g, x'), y'), ap(ap(x', y'), 0)), 0)), 0)), 0)), 0))
two new Dependency Pairs are created:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1)), ap(ap(ap(ap(g, f), y''), ap(y'', 0)), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1)), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0)), 0)), 0))

The transformation is resulting in one new DP problem:

`   R`
`     ↳DPs`
`       →DP Problem 1`
`         ↳Nar`
`           →DP Problem 2`
`             ↳Nar`
`             ...`
`               →DP Problem 28`
`                 ↳Narrowing Transformation`

Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1)), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1)), ap(ap(ap(ap(g, f), y''), ap(y'', 0)), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z'0)), ap(ap(ap(ap(g, f), f), 0), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), f)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), f)), ap(s, z'0)), ap(ap(ap(ap(g, f), f), 0), 0)), 0)), 0))
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 29`
`                 ↳Remaining Obligation(s)`

The following remains to be proven:
• Dependency Pair:

AP(ap(ap(g, f), y'), ap(s, z)) -> AP(ap(ap(g, f), y'), ap(y', 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

• Dependency Pairs:

AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, f), y'')), ap(s, z'1)), ap(ap(ap(ap(g, f), y''), ap(y'', 0)), 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z'0)), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, f), s)), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, f), s)), ap(s, z''')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0'))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, x'''), y''')), ap(s, z'''''))), ap(s, z''0')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), s)), ap(s, z'')), ap(ap(ap(ap(g, f), s), ap(s, 0)), 0))
AP(ap(ap(g, ap(ap(g, ap(ap(g, f), y''''')), ap(s, z''''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, f), y''''')), ap(s, z'''')), ap(s, z''))
AP(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, x''), y''), ap(s, z''))
AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(s, z)) -> AP(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z'''))), ap(s, z'')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0))), ap(s, z''')), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1))), ap(s, z'0)), ap(ap(ap(ap(g, ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2))), ap(s, z'1)), ap(ap(ap(ap(g, ap(ap(g, x''), y'')), ap(s, z'2)), ap(ap(ap(ap(g, x''), y''), ap(ap(x'', y''), 0)), 0)), 0)), 0)), 0)), 0))

Rules:

ap(f, x) -> x
ap(ap(ap(g, x), y), ap(s, z)) -> ap(ap(ap(g, x), y), ap(ap(x, y), 0))

Strategy:

innermost

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