Term Rewriting System R:
[dummy, dummy2, x, y, z]
function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

FUNCTION(p, s(s(x)), dummy, dummy2) -> FUNCTION(p, s(x), x, x)
FUNCTION(plus, dummy, x, y) -> FUNCTION(if, function(iszero, x, x, x), x, y)
FUNCTION(plus, dummy, x, y) -> FUNCTION(iszero, x, x, x)
FUNCTION(if, false, x, y) -> FUNCTION(plus, function(third, x, y, y), function(p, x, x, y), s(y))
FUNCTION(if, false, x, y) -> FUNCTION(third, x, y, y)
FUNCTION(if, false, x, y) -> FUNCTION(p, x, x, y)

Furthermore, R contains two SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
Rw


Dependency Pair:

FUNCTION(p, s(s(x)), dummy, dummy2) -> FUNCTION(p, s(x), x, x)


Rules:


function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z


Strategy:

innermost




The following dependency pair can be strictly oriented:

FUNCTION(p, s(s(x)), dummy, dummy2) -> FUNCTION(p, s(x), x, x)


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(s(x1))=  1 + x1  

resulting in one new DP problem.
Used Argument Filtering System:
FUNCTION(x1, x2, x3, x4) -> x2
s(x1) -> s(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 3
Dependency Graph
       →DP Problem 2
Rw


Dependency Pair:


Rules:


function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Rewriting Transformation


Dependency Pairs:

FUNCTION(if, false, x, y) -> FUNCTION(plus, function(third, x, y, y), function(p, x, x, y), s(y))
FUNCTION(plus, dummy, x, y) -> FUNCTION(if, function(iszero, x, x, x), x, y)


Rules:


function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z


Strategy:

innermost




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

FUNCTION(if, false, x, y) -> FUNCTION(plus, function(third, x, y, y), function(p, x, x, y), s(y))
one new Dependency Pair is created:

FUNCTION(if, false, x, y) -> FUNCTION(plus, y, function(p, x, x, y), s(y))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Rw
           →DP Problem 4
Narrowing Transformation


Dependency Pairs:

FUNCTION(if, false, x, y) -> FUNCTION(plus, y, function(p, x, x, y), s(y))
FUNCTION(plus, dummy, x, y) -> FUNCTION(if, function(iszero, x, x, x), x, y)


Rules:


function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z


Strategy:

innermost




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

FUNCTION(plus, dummy, x, y) -> FUNCTION(if, function(iszero, x, x, x), x, y)
two new Dependency Pairs are created:

FUNCTION(plus, dummy, 0, y) -> FUNCTION(if, true, 0, y)
FUNCTION(plus, dummy, s(x''), y) -> FUNCTION(if, false, s(x''), y)

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

FUNCTION(plus, dummy, s(x''), y) -> FUNCTION(if, false, s(x''), y)
FUNCTION(if, false, x, y) -> FUNCTION(plus, y, function(p, x, x, y), s(y))


Rules:


function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z


Strategy:

innermost




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

FUNCTION(if, false, x, y) -> FUNCTION(plus, y, function(p, x, x, y), s(y))
three new Dependency Pairs are created:

FUNCTION(if, false, 0, y') -> FUNCTION(plus, y', 0, s(y'))
FUNCTION(if, false, s(0), y') -> FUNCTION(plus, y', 0, s(y'))
FUNCTION(if, false, s(s(x'')), y') -> FUNCTION(plus, y', s(function(p, s(x''), x'', x'')), s(y'))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Rw
           →DP Problem 4
Nar
             ...
               →DP Problem 6
Instantiation Transformation


Dependency Pairs:

FUNCTION(if, false, s(s(x'')), y') -> FUNCTION(plus, y', s(function(p, s(x''), x'', x'')), s(y'))
FUNCTION(plus, dummy, s(x''), y) -> FUNCTION(if, false, s(x''), y)


Rules:


function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z


Strategy:

innermost




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

FUNCTION(plus, dummy, s(x''), y) -> FUNCTION(if, false, s(x''), y)
one new Dependency Pair is created:

FUNCTION(plus, dummy', s(x'''), s(dummy')) -> FUNCTION(if, false, s(x'''), s(dummy'))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Rw
           →DP Problem 4
Nar
             ...
               →DP Problem 7
Instantiation Transformation


Dependency Pairs:

FUNCTION(plus, dummy', s(x'''), s(dummy')) -> FUNCTION(if, false, s(x'''), s(dummy'))
FUNCTION(if, false, s(s(x'')), y') -> FUNCTION(plus, y', s(function(p, s(x''), x'', x'')), s(y'))


Rules:


function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z


Strategy:

innermost




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

FUNCTION(if, false, s(s(x'')), y') -> FUNCTION(plus, y', s(function(p, s(x''), x'', x'')), s(y'))
one new Dependency Pair is created:

FUNCTION(if, false, s(s(x''')), s(dummy''')) -> FUNCTION(plus, s(dummy'''), s(function(p, s(x'''), x''', x''')), s(s(dummy''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Rw
           →DP Problem 4
Nar
             ...
               →DP Problem 8
Remaining Obligation(s)




The following remains to be proven:
Dependency Pairs:

FUNCTION(if, false, s(s(x''')), s(dummy''')) -> FUNCTION(plus, s(dummy'''), s(function(p, s(x'''), x''', x''')), s(s(dummy''')))
FUNCTION(plus, dummy', s(x'''), s(dummy')) -> FUNCTION(if, false, s(x'''), s(dummy'))


Rules:


function(iszero, 0, dummy, dummy2) -> true
function(iszero, s(x), dummy, dummy2) -> false
function(p, 0, dummy, dummy2) -> 0
function(p, s(0), dummy, dummy2) -> 0
function(p, s(s(x)), dummy, dummy2) -> s(function(p, s(x), x, x))
function(plus, dummy, x, y) -> function(if, function(iszero, x, x, x), x, y)
function(if, true, x, y) -> y
function(if, false, x, y) -> function(plus, function(third, x, y, y), function(p, x, x, y), s(y))
function(third, x, y, z) -> z


Strategy:

innermost



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