Term Rewriting System R:
[x, y, u, z]
app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(perfectp, app(s, x)) -> APP(app(app(f, x), app(s, 0)), app(s, x))
APP(perfectp, app(s, x)) -> APP(app(f, x), app(s, 0))
APP(perfectp, app(s, x)) -> APP(f, x)
APP(perfectp, app(s, x)) -> APP(s, 0)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(f, x), u), app(app(minus, z), app(s, x)))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(f, x)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(minus, z), app(s, x))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(minus, z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(if, app(app(le, x), y))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(le, x), y)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(le, x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, app(s, x)), app(app(minus, y), x))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(minus, y)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(f, x)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(le, x), y)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(minus, z), app(s, x))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(f, x), u), app(app(minus, z), app(s, x)))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(f, x), app(s, 0))
APP(perfectp, app(s, x)) -> APP(app(app(f, x), app(s, 0)), app(s, x))
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(perfectp, app(s, x)) -> APP(app(app(f, x), app(s, 0)), app(s, x))
no new Dependency Pairs are created.
The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(le, x), y)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(minus, z), app(s, x))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(f, x), u), app(app(minus, z), app(s, x)))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(f, x), app(s, 0))
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(perfectp, app(s, x)) -> APP(app(f, x), app(s, 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 3
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(le, x), y)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(minus, z), app(s, x))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(f, x), u), app(app(minus, z), app(s, x)))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(f, x), u), app(app(minus, z), app(s, x)))
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(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(le, x), y)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(minus, z), app(s, x))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(f, x), u)
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
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(le, x), y)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(minus, z), app(s, x))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(minus, z), app(s, x))
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 6
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(le, x), y)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))
four new Dependency Pairs are created:

APP(app(app(app(f, app(s, 0)), app(s, y)), 0), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), 0), u'')), true)
APP(app(app(app(f, app(s, 0)), app(s, y)), app(s, z'')), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), app(s, z'')), u'')), false)
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))
APP(app(app(app(f, app(s, 0)), app(s, y)), app(s, z'')), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), app(s, z'')), u'')), false)
APP(app(app(app(f, app(s, 0)), app(s, y)), 0), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), 0), u'')), true)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(le, x), y)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u))
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 8
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))
APP(app(app(app(f, app(s, 0)), app(s, y)), app(s, z'')), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), app(s, z'')), u'')), false)
APP(app(app(app(f, app(s, 0)), app(s, y)), 0), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), 0), u'')), true)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(le, x), y)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(le, x), y)
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 9
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))
APP(app(app(app(f, app(s, 0)), app(s, y)), app(s, z'')), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), app(s, z'')), u'')), false)
APP(app(app(app(f, app(s, 0)), app(s, y)), 0), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), 0), u'')), true)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)
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 10
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))
APP(app(app(app(f, app(s, 0)), app(s, y)), app(s, z'')), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), app(s, z'')), u'')), false)
APP(app(app(app(f, app(s, 0)), app(s, y)), 0), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), 0), u'')), true)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, app(s, x)), app(app(minus, y), x)), z)
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 11
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))
APP(app(app(app(f, app(s, 0)), app(s, y)), app(s, z'')), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), app(s, z'')), u'')), false)
APP(app(app(app(f, app(s, 0)), app(s, y)), 0), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), 0), u'')), true)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(minus, y), x)
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 12
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))
APP(app(app(app(f, app(s, 0)), app(s, y)), app(s, z'')), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), app(s, z'')), u'')), false)
APP(app(app(app(f, app(s, 0)), app(s, y)), 0), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), 0), u'')), true)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(f, x), u), z)
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:

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))
APP(app(app(app(f, app(s, 0)), app(s, y)), app(s, z'')), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), app(s, z'')), u'')), false)
APP(app(app(app(f, app(s, 0)), app(s, y)), 0), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), 0), u'')), true)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(f, x), u)
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 14
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))
APP(app(app(app(f, app(s, 0)), app(s, y)), app(s, z'')), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), app(s, z'')), u'')), false)
APP(app(app(app(f, app(s, 0)), app(s, y)), 0), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), 0), u'')), true)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, 0)), app(s, y)), 0), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), 0), u'')), true)
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 15
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))
APP(app(app(app(f, app(s, 0)), app(s, y)), app(s, z'')), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), app(s, z'')), u'')), false)
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, 0)), app(s, y)), app(s, z'')), u'') -> APP(app(app(if, app(app(le, 0), y)), app(app(app(app(f, app(s, 0)), app(app(minus, y), 0)), app(s, z'')), u'')), false)
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 16
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), 0) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), 0)), app(app(app(app(f, x''), 0), app(app(minus, z''), app(s, x''))), 0))
one new Dependency Pair is created:

APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), 0) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), 0)), app(app(app(app(f, x'), 0), app(app(minus, app(app(minus, z'''), app(s, app(s, x')))), app(s, x'))), 0))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), 0) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), 0)), app(app(app(app(f, x'), 0), app(app(minus, app(app(minus, z'''), app(s, app(s, x')))), app(s, x'))), 0))
APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, app(s, x''))), app(s, y)), z''), app(s, y'')) -> APP(app(app(if, app(app(le, app(s, x'')), y)), app(app(app(app(f, app(s, app(s, x''))), app(app(minus, y), app(s, x''))), z''), app(s, y''))), app(app(app(if, app(app(le, x''), y'')), app(app(app(app(f, app(s, x'')), app(app(minus, y''), x'')), z''), app(s, y''))), app(app(app(app(f, x''), app(s, y'')), z''), app(s, y''))))
three new Dependency Pairs are created:

APP(app(app(app(f, app(s, app(s, 0))), app(s, y)), 0), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, 0)), y)), app(app(app(app(f, app(s, app(s, 0))), app(app(minus, y), app(s, 0))), 0), app(s, y'''))), app(app(app(if, app(app(le, 0), y''')), app(app(app(app(f, app(s, 0)), app(app(minus, y'''), 0)), 0), app(s, y'''))), true))
APP(app(app(app(f, app(s, app(s, 0))), app(s, y)), app(s, z')), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, 0)), y)), app(app(app(app(f, app(s, app(s, 0))), app(app(minus, y), app(s, 0))), app(s, z')), app(s, y'''))), app(app(app(if, app(app(le, 0), y''')), app(app(app(app(f, app(s, 0)), app(app(minus, y'''), 0)), app(s, z')), app(s, y'''))), false))
APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), app(s, y'''))), app(app(app(if, app(app(le, app(s, x')), y''')), app(app(app(app(f, app(s, app(s, x'))), app(app(minus, y'''), app(s, x'))), z'''), app(s, y'''))), app(app(app(if, app(app(le, x'), y''')), app(app(app(app(f, app(s, x')), app(app(minus, y'''), x')), z'''), app(s, y'''))), app(app(app(app(f, x'), app(s, y''')), z'''), app(s, y''')))))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), app(s, y'''))), app(app(app(if, app(app(le, app(s, x')), y''')), app(app(app(app(f, app(s, app(s, x'))), app(app(minus, y'''), app(s, x'))), z'''), app(s, y'''))), app(app(app(if, app(app(le, x'), y''')), app(app(app(app(f, app(s, x')), app(app(minus, y'''), x')), z'''), app(s, y'''))), app(app(app(app(f, x'), app(s, y''')), z'''), app(s, y''')))))
APP(app(app(app(f, app(s, app(s, 0))), app(s, y)), app(s, z')), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, 0)), y)), app(app(app(app(f, app(s, app(s, 0))), app(app(minus, y), app(s, 0))), app(s, z')), app(s, y'''))), app(app(app(if, app(app(le, 0), y''')), app(app(app(app(f, app(s, 0)), app(app(minus, y'''), 0)), app(s, z')), app(s, y'''))), false))
APP(app(app(app(f, app(s, app(s, 0))), app(s, y)), 0), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, 0)), y)), app(app(app(app(f, app(s, app(s, 0))), app(app(minus, y), app(s, 0))), 0), app(s, y'''))), app(app(app(if, app(app(le, 0), y''')), app(app(app(app(f, app(s, 0)), app(app(minus, y'''), 0)), 0), app(s, y'''))), true))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), 0) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), 0)), app(app(app(app(f, x'), 0), app(app(minus, app(app(minus, z'''), app(s, app(s, x')))), app(s, x'))), 0))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, app(s, 0))), app(s, y)), 0), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, 0)), y)), app(app(app(app(f, app(s, app(s, 0))), app(app(minus, y), app(s, 0))), 0), app(s, y'''))), app(app(app(if, app(app(le, 0), y''')), app(app(app(app(f, app(s, 0)), app(app(minus, y'''), 0)), 0), app(s, y'''))), true))
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 19
Narrowing Transformation


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, 0))), app(s, y)), app(s, z')), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, 0)), y)), app(app(app(app(f, app(s, app(s, 0))), app(app(minus, y), app(s, 0))), app(s, z')), app(s, y'''))), app(app(app(if, app(app(le, 0), y''')), app(app(app(app(f, app(s, 0)), app(app(minus, y'''), 0)), app(s, z')), app(s, y'''))), false))
APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), 0) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), 0)), app(app(app(app(f, x'), 0), app(app(minus, app(app(minus, z'''), app(s, app(s, x')))), app(s, x'))), 0))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), app(s, y'''))), app(app(app(if, app(app(le, app(s, x')), y''')), app(app(app(app(f, app(s, app(s, x'))), app(app(minus, y'''), app(s, x'))), z'''), app(s, y'''))), app(app(app(if, app(app(le, x'), y''')), app(app(app(app(f, app(s, x')), app(app(minus, y'''), x')), z'''), app(s, y'''))), app(app(app(app(f, x'), app(s, y''')), z'''), app(s, y''')))))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




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

APP(app(app(app(f, app(s, app(s, 0))), app(s, y)), app(s, z')), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, 0)), y)), app(app(app(app(f, app(s, app(s, 0))), app(app(minus, y), app(s, 0))), app(s, z')), app(s, y'''))), app(app(app(if, app(app(le, 0), y''')), app(app(app(app(f, app(s, 0)), app(app(minus, y'''), 0)), app(s, z')), app(s, y'''))), false))
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 20
Polynomial Ordering


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), app(s, y'''))), app(app(app(if, app(app(le, app(s, x')), y''')), app(app(app(app(f, app(s, app(s, x'))), app(app(minus, y'''), app(s, x'))), z'''), app(s, y'''))), app(app(app(if, app(app(le, x'), y''')), app(app(app(app(f, app(s, x')), app(app(minus, y'''), x')), z'''), app(s, y'''))), app(app(app(app(f, x'), app(s, y''')), z'''), app(s, y''')))))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), 0) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), 0)), app(app(app(app(f, x'), 0), app(app(minus, app(app(minus, z'''), app(s, app(s, x')))), app(s, x'))), 0))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




The following dependency pair can be strictly oriented:

APP(perfectp, app(s, x)) -> APP(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS can be oriented:

app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(if)=  0  
  POL(0)=  0  
  POL(false)=  0  
  POL(perfectp)=  1  
  POL(minus)=  0  
  POL(true)=  0  
  POL(s)=  0  
  POL(le)=  0  
  POL(app(x1, x2))=  0  
  POL(f)=  0  
  POL(APP(x1, x2))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 21
Polynomial Ordering


Dependency Pairs:

APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), app(s, y'''))), app(app(app(if, app(app(le, app(s, x')), y''')), app(app(app(app(f, app(s, app(s, x'))), app(app(minus, y'''), app(s, x'))), z'''), app(s, y'''))), app(app(app(if, app(app(le, x'), y''')), app(app(app(app(f, app(s, x')), app(app(minus, y'''), x')), z'''), app(s, y'''))), app(app(app(app(f, x'), app(s, y''')), z'''), app(s, y''')))))
APP(app(app(app(f, app(s, x)), app(s, y)), z), u) -> APP(app(app(app(f, x), u), z), u)
APP(app(app(app(f, app(s, x)), 0), z), u) -> APP(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), 0) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), 0)), app(app(app(app(f, x'), 0), app(app(minus, app(app(minus, z'''), app(s, app(s, x')))), app(s, x'))), 0))


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), app(s, y''')) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), app(s, y'''))), app(app(app(if, app(app(le, app(s, x')), y''')), app(app(app(app(f, app(s, app(s, x'))), app(app(minus, y'''), app(s, x'))), z'''), app(s, y'''))), app(app(app(if, app(app(le, x'), y''')), app(app(app(app(f, app(s, x')), app(app(minus, y'''), x')), z'''), app(s, y'''))), app(app(app(app(f, x'), app(s, y''')), z'''), app(s, y''')))))
APP(app(app(app(f, app(s, app(s, app(s, x')))), app(s, y)), z'''), 0) -> APP(app(app(if, app(app(le, app(s, app(s, x'))), y)), app(app(app(app(f, app(s, app(s, app(s, x')))), app(app(minus, y), app(s, app(s, x')))), z'''), 0)), app(app(app(app(f, x'), 0), app(app(minus, app(app(minus, z'''), app(s, app(s, x')))), app(s, x'))), 0))


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS can be oriented:

app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(if)=  0  
  POL(0)=  0  
  POL(false)=  0  
  POL(perfectp)=  1  
  POL(minus)=  1  
  POL(true)=  0  
  POL(s)=  0  
  POL(le)=  0  
  POL(app(x1, x2))=  x1  
  POL(f)=  1  
  POL(APP(x1, x2))=  1 + x1  

resulting in one new DP problem.



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




The following remains to be proven:
Dependency Pairs:

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


Rules:


app(perfectp, 0) -> false
app(perfectp, app(s, x)) -> app(app(app(app(f, x), app(s, 0)), app(s, x)), app(s, x))
app(app(app(app(f, 0), y), 0), u) -> true
app(app(app(app(f, 0), y), app(s, z)), u) -> false
app(app(app(app(f, app(s, x)), 0), z), u) -> app(app(app(app(f, x), u), app(app(minus, z), app(s, x))), u)
app(app(app(app(f, app(s, x)), app(s, y)), z), u) -> app(app(app(if, app(app(le, x), y)), app(app(app(app(f, app(s, x)), app(app(minus, y), x)), z), u)), app(app(app(app(f, x), u), z), u))


Strategy:

innermost



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