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

Termination of R to be shown.

`   R`
`     ↳Dependency Pair Analysis`

R contains the following Dependency Pairs:

APP(app(minus, app(s, x)), app(s, y)) -> APP(app(minus, x), y)
APP(app(minus, app(s, x)), app(s, y)) -> APP(minus, x)
APP(f, 0) -> APP(s, 0)
APP(f, app(s, x)) -> APP(app(minus, app(s, x)), app(g, app(f, x)))
APP(f, app(s, x)) -> APP(minus, app(s, x))
APP(f, app(s, x)) -> APP(g, app(f, x))
APP(f, app(s, x)) -> APP(f, x)
APP(g, app(s, x)) -> APP(app(minus, app(s, x)), app(f, app(g, x)))
APP(g, app(s, x)) -> APP(minus, app(s, x))
APP(g, app(s, x)) -> APP(f, app(g, x))
APP(g, app(s, x)) -> APP(g, x)

Furthermore, R contains one SCC.

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

Dependency Pairs:

APP(g, app(s, x)) -> APP(g, x)
APP(g, app(s, x)) -> APP(f, app(g, x))
APP(f, app(s, x)) -> APP(f, x)
APP(g, app(s, x)) -> APP(app(minus, app(s, x)), app(f, app(g, x)))
APP(f, app(s, x)) -> APP(g, app(f, x))
APP(f, app(s, x)) -> APP(app(minus, app(s, x)), app(g, app(f, x)))
APP(app(minus, app(s, x)), app(s, y)) -> APP(app(minus, x), y)

Rules:

app(app(minus, x), 0) -> x
app(app(minus, app(s, x)), app(s, y)) -> app(app(minus, x), y)
app(f, 0) -> app(s, 0)
app(f, app(s, x)) -> app(app(minus, app(s, x)), app(g, app(f, x)))
app(g, 0) -> 0
app(g, app(s, x)) -> app(app(minus, app(s, x)), app(f, app(g, x)))

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

APP(f, app(s, x)) -> APP(g, app(f, x))
two new Dependency Pairs are created:

APP(f, app(s, 0)) -> APP(g, app(s, 0))
APP(f, app(s, app(s, x''))) -> APP(g, app(app(minus, app(s, x'')), app(g, app(f, x''))))

The transformation is resulting in one new DP problem:

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

Dependency Pairs:

APP(f, app(s, app(s, x''))) -> APP(g, app(app(minus, app(s, x'')), app(g, app(f, x''))))
APP(g, app(s, x)) -> APP(f, app(g, x))
APP(f, app(s, 0)) -> APP(g, app(s, 0))
APP(f, app(s, x)) -> APP(f, x)
APP(f, app(s, x)) -> APP(app(minus, app(s, x)), app(g, app(f, x)))
APP(app(minus, app(s, x)), app(s, y)) -> APP(app(minus, x), y)
APP(g, app(s, x)) -> APP(app(minus, app(s, x)), app(f, app(g, x)))
APP(g, app(s, x)) -> APP(g, x)

Rules:

app(app(minus, x), 0) -> x
app(app(minus, app(s, x)), app(s, y)) -> app(app(minus, x), y)
app(f, 0) -> app(s, 0)
app(f, app(s, x)) -> app(app(minus, app(s, x)), app(g, app(f, x)))
app(g, 0) -> 0
app(g, app(s, x)) -> app(app(minus, app(s, x)), app(f, app(g, x)))

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

APP(g, app(s, x)) -> APP(f, app(g, x))
two new Dependency Pairs are created:

APP(g, app(s, 0)) -> APP(f, 0)
APP(g, app(s, app(s, x''))) -> APP(f, app(app(minus, app(s, x'')), app(f, app(g, x''))))

The transformation is resulting in one new DP problem:

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

The following remains to be proven:
Dependency Pairs:

APP(g, app(s, app(s, x''))) -> APP(f, app(app(minus, app(s, x'')), app(f, app(g, x''))))
APP(g, app(s, x)) -> APP(g, x)
APP(f, app(s, 0)) -> APP(g, app(s, 0))
APP(f, app(s, x)) -> APP(f, x)
APP(f, app(s, x)) -> APP(app(minus, app(s, x)), app(g, app(f, x)))
APP(app(minus, app(s, x)), app(s, y)) -> APP(app(minus, x), y)
APP(g, app(s, x)) -> APP(app(minus, app(s, x)), app(f, app(g, x)))
APP(f, app(s, app(s, x''))) -> APP(g, app(app(minus, app(s, x'')), app(g, app(f, x''))))

Rules:

app(app(minus, x), 0) -> x
app(app(minus, app(s, x)), app(s, y)) -> app(app(minus, x), y)
app(f, 0) -> app(s, 0)
app(f, app(s, x)) -> app(app(minus, app(s, x)), app(g, app(f, x)))
app(g, 0) -> 0
app(g, app(s, x)) -> app(app(minus, app(s, x)), app(f, app(g, x)))

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