Term Rewriting System R:
[y, x, u, z]
app(app(minus, 0), y) -> 0
app(app(minus, app(s, x)), 0) -> app(s, x)
app(app(minus, app(s, x)), app(s, y)) -> app(app(minus, x), y)
app(app(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(app(app(if, true), x), y) -> x
app(app(app(if, false), x), y) -> y
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(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(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(le, app(s, x)), app(s, y)) -> APP(le, x)
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))
APP(app(le, app(s, x)), app(s, y)) -> APP(app(le, x), y)
APP(app(minus, app(s, x)), app(s, y)) -> APP(app(minus, x), y)


Rules:


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


Rules:


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


Rules:


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


Rules:


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


Rules:


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


Rules:


app(app(minus, 0), y) -> 0
app(app(minus, app(s, x)), 0) -> app(s, x)
app(app(minus, app(s, x)), app(s, y)) -> app(app(minus, x), y)
app(app(le, 0), y) -> true
app(app(le, app(s, x)), 0) -> false
app(app(le, app(s, x)), app(s, y)) -> app(app(le, x), y)
app(app(app(if, true), x), y) -> x
app(app(app(if, false), x), y) -> y
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:19 minutes