(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following 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
Q is empty.
(1) Overlay + Local Confluence (EQUIVALENT transformation)
The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.
(2) Obligation:
Q restricted rewrite system:
The TRS R consists of the following 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
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
(3) DependencyPairsProof (EQUIVALENT transformation)
Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.
(4) Obligation:
Q DP problem:
The TRS P consists of the following rules:
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)
The TRS R consists of the following 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
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(5) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs with 3 less nodes.
(6) Complex Obligation (AND)
(7) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(p, s(s(x)), dummy, dummy2) → FUNCTION(p, s(x), x, x)
The TRS R consists of the following 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
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(8) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(9) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(p, s(s(x)), dummy, dummy2) → FUNCTION(p, s(x), x, x)
R is empty.
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(10) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
(11) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(p, s(s(x)), dummy, dummy2) → FUNCTION(p, s(x), x, x)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
(12) QDPSizeChangeProof (EQUIVALENT transformation)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.
From the DPs we obtained the following set of size-change graphs:
- FUNCTION(p, s(s(x)), dummy, dummy2) → FUNCTION(p, s(x), x, x)
The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3, 2 > 4
(13) TRUE
(14) Obligation:
Q DP problem:
The TRS P consists of the following rules:
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)
The TRS R consists of the following 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
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(15) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(16) Obligation:
Q DP problem:
The TRS P consists of the following rules:
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)
The TRS R consists of the following rules:
function(iszero, 0, dummy, dummy2) → true
function(iszero, s(x), dummy, dummy2) → false
function(third, x, y, z) → z
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))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(17) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
FUNCTION(
plus,
dummy,
x,
y) →
FUNCTION(
if,
function(
iszero,
x,
x,
x),
x,
y) we obtained the following new rules [LPAR04]:
FUNCTION(plus, y_0, y_1, s(z1)) → FUNCTION(if, function(iszero, y_1, y_1, y_1), y_1, s(z1))
(18) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(if, false, x, y) → FUNCTION(plus, function(third, x, y, y), function(p, x, x, y), s(y))
FUNCTION(plus, y_0, y_1, s(z1)) → FUNCTION(if, function(iszero, y_1, y_1, y_1), y_1, s(z1))
The TRS R consists of the following rules:
function(iszero, 0, dummy, dummy2) → true
function(iszero, s(x), dummy, dummy2) → false
function(third, x, y, z) → z
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))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(19) Rewriting (EQUIVALENT transformation)
By rewriting [LPAR04] the rule
FUNCTION(
if,
false,
x,
y) →
FUNCTION(
plus,
function(
third,
x,
y,
y),
function(
p,
x,
x,
y),
s(
y)) at position [1] we obtained the following new rules [LPAR04]:
FUNCTION(if, false, x, y) → FUNCTION(plus, y, function(p, x, x, y), s(y))
(20) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(plus, dummy, x, y) → FUNCTION(if, function(iszero, x, x, x), x, y)
FUNCTION(if, false, x, y) → FUNCTION(plus, y, function(p, x, x, y), s(y))
The TRS R consists of the following rules:
function(iszero, 0, dummy, dummy2) → true
function(iszero, s(x), dummy, dummy2) → false
function(third, x, y, z) → z
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))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(21) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(22) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(plus, dummy, x, y) → FUNCTION(if, function(iszero, x, x, x), x, y)
FUNCTION(if, false, x, y) → FUNCTION(plus, y, function(p, x, x, y), s(y))
The TRS R consists of the following rules:
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(iszero, 0, dummy, dummy2) → true
function(iszero, s(x), dummy, dummy2) → false
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(23) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
FUNCTION(
plus,
dummy,
x,
y) →
FUNCTION(
if,
function(
iszero,
x,
x,
x),
x,
y) we obtained the following new rules [LPAR04]:
FUNCTION(plus, z1, y_0, s(z1)) → FUNCTION(if, function(iszero, y_0, y_0, y_0), y_0, s(z1))
(24) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(if, false, x, y) → FUNCTION(plus, y, function(p, x, x, y), s(y))
FUNCTION(plus, z1, y_0, s(z1)) → FUNCTION(if, function(iszero, y_0, y_0, y_0), y_0, s(z1))
The TRS R consists of the following rules:
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(iszero, 0, dummy, dummy2) → true
function(iszero, s(x), dummy, dummy2) → false
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(25) Narrowing (EQUIVALENT transformation)
By narrowing [LPAR04] the rule
FUNCTION(
plus,
z1,
y_0,
s(
z1)) →
FUNCTION(
if,
function(
iszero,
y_0,
y_0,
y_0),
y_0,
s(
z1)) at position [1] we obtained the following new rules [LPAR04]:
FUNCTION(plus, y0, 0, s(y0)) → FUNCTION(if, true, 0, s(y0))
FUNCTION(plus, y0, s(x0), s(y0)) → FUNCTION(if, false, s(x0), s(y0))
(26) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(if, false, x, y) → FUNCTION(plus, y, function(p, x, x, y), s(y))
FUNCTION(plus, y0, 0, s(y0)) → FUNCTION(if, true, 0, s(y0))
FUNCTION(plus, y0, s(x0), s(y0)) → FUNCTION(if, false, s(x0), s(y0))
The TRS R consists of the following rules:
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(iszero, 0, dummy, dummy2) → true
function(iszero, s(x), dummy, dummy2) → false
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(27) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.
(28) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(plus, y0, s(x0), s(y0)) → FUNCTION(if, false, s(x0), s(y0))
FUNCTION(if, false, x, y) → FUNCTION(plus, y, function(p, x, x, y), s(y))
The TRS R consists of the following rules:
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(iszero, 0, dummy, dummy2) → true
function(iszero, s(x), dummy, dummy2) → false
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(29) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(30) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(plus, y0, s(x0), s(y0)) → FUNCTION(if, false, s(x0), s(y0))
FUNCTION(if, false, x, y) → FUNCTION(plus, y, function(p, x, x, y), s(y))
The TRS R consists of the following rules:
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))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(31) Narrowing (EQUIVALENT transformation)
By narrowing [LPAR04] the rule
FUNCTION(
if,
false,
x,
y) →
FUNCTION(
plus,
y,
function(
p,
x,
x,
y),
s(
y)) at position [2] we obtained the following new rules [LPAR04]:
FUNCTION(if, false, 0, x1) → FUNCTION(plus, x1, 0, s(x1))
FUNCTION(if, false, s(0), x1) → FUNCTION(plus, x1, 0, s(x1))
FUNCTION(if, false, s(s(x0)), x2) → FUNCTION(plus, x2, s(function(p, s(x0), x0, x0)), s(x2))
(32) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(plus, y0, s(x0), s(y0)) → FUNCTION(if, false, s(x0), s(y0))
FUNCTION(if, false, 0, x1) → FUNCTION(plus, x1, 0, s(x1))
FUNCTION(if, false, s(0), x1) → FUNCTION(plus, x1, 0, s(x1))
FUNCTION(if, false, s(s(x0)), x2) → FUNCTION(plus, x2, s(function(p, s(x0), x0, x0)), s(x2))
The TRS R consists of the following rules:
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))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(33) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes.
(34) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(if, false, s(s(x0)), x2) → FUNCTION(plus, x2, s(function(p, s(x0), x0, x0)), s(x2))
FUNCTION(plus, y0, s(x0), s(y0)) → FUNCTION(if, false, s(x0), s(y0))
The TRS R consists of the following rules:
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))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(35) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(36) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(if, false, s(s(x0)), x2) → FUNCTION(plus, x2, s(function(p, s(x0), x0, x0)), s(x2))
FUNCTION(plus, y0, s(x0), s(y0)) → FUNCTION(if, false, s(x0), s(y0))
The TRS R consists of the following rules:
function(p, s(0), dummy, dummy2) → 0
function(p, s(s(x)), dummy, dummy2) → s(function(p, s(x), x, x))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(37) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
FUNCTION(
if,
false,
s(
s(
x0)),
x2) →
FUNCTION(
plus,
x2,
s(
function(
p,
s(
x0),
x0,
x0)),
s(
x2)) we obtained the following new rules [LPAR04]:
FUNCTION(if, false, s(s(x0)), s(z0)) → FUNCTION(plus, s(z0), s(function(p, s(x0), x0, x0)), s(s(z0)))
(38) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(plus, y0, s(x0), s(y0)) → FUNCTION(if, false, s(x0), s(y0))
FUNCTION(if, false, s(s(x0)), s(z0)) → FUNCTION(plus, s(z0), s(function(p, s(x0), x0, x0)), s(s(z0)))
The TRS R consists of the following rules:
function(p, s(0), dummy, dummy2) → 0
function(p, s(s(x)), dummy, dummy2) → s(function(p, s(x), x, x))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(39) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
FUNCTION(
plus,
y0,
s(
x0),
s(
y0)) →
FUNCTION(
if,
false,
s(
x0),
s(
y0)) we obtained the following new rules [LPAR04]:
FUNCTION(plus, s(z1), s(y_0), s(s(z1))) → FUNCTION(if, false, s(y_0), s(s(z1)))
(40) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(if, false, s(s(x0)), s(z0)) → FUNCTION(plus, s(z0), s(function(p, s(x0), x0, x0)), s(s(z0)))
FUNCTION(plus, s(z1), s(y_0), s(s(z1))) → FUNCTION(if, false, s(y_0), s(s(z1)))
The TRS R consists of the following rules:
function(p, s(0), dummy, dummy2) → 0
function(p, s(s(x)), dummy, dummy2) → s(function(p, s(x), x, x))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(41) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
FUNCTION(
if,
false,
s(
s(
x0)),
s(
z0)) →
FUNCTION(
plus,
s(
z0),
s(
function(
p,
s(
x0),
x0,
x0)),
s(
s(
z0))) we obtained the following new rules [LPAR04]:
FUNCTION(if, false, s(s(x0)), s(s(z0))) → FUNCTION(plus, s(s(z0)), s(function(p, s(x0), x0, x0)), s(s(s(z0))))
(42) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(plus, s(z1), s(y_0), s(s(z1))) → FUNCTION(if, false, s(y_0), s(s(z1)))
FUNCTION(if, false, s(s(x0)), s(s(z0))) → FUNCTION(plus, s(s(z0)), s(function(p, s(x0), x0, x0)), s(s(s(z0))))
The TRS R consists of the following rules:
function(p, s(0), dummy, dummy2) → 0
function(p, s(s(x)), dummy, dummy2) → s(function(p, s(x), x, x))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(43) ForwardInstantiation (EQUIVALENT transformation)
By forward instantiating [JAR06] the rule
FUNCTION(
plus,
s(
z1),
s(
y_0),
s(
s(
z1))) →
FUNCTION(
if,
false,
s(
y_0),
s(
s(
z1))) we obtained the following new rules [LPAR04]:
FUNCTION(plus, s(x0), s(s(y_0)), s(s(x0))) → FUNCTION(if, false, s(s(y_0)), s(s(x0)))
(44) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(if, false, s(s(x0)), s(s(z0))) → FUNCTION(plus, s(s(z0)), s(function(p, s(x0), x0, x0)), s(s(s(z0))))
FUNCTION(plus, s(x0), s(s(y_0)), s(s(x0))) → FUNCTION(if, false, s(s(y_0)), s(s(x0)))
The TRS R consists of the following rules:
function(p, s(0), dummy, dummy2) → 0
function(p, s(s(x)), dummy, dummy2) → s(function(p, s(x), x, x))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(45) QDPOrderProof (EQUIVALENT transformation)
We use the reduction pair processor [LPAR04].
The following pairs can be oriented strictly and are deleted.
FUNCTION(if, false, s(s(x0)), s(s(z0))) → FUNCTION(plus, s(s(z0)), s(function(p, s(x0), x0, x0)), s(s(s(z0))))
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:
POL(FUNCTION(x1, x2, x3, x4)) = | | + | | · | x1 | + | | · | x2 | + | | · | x3 | + | | · | x4 |
POL(function(x1, x2, x3, x4)) = | | + | | · | x1 | + | | · | x2 | + | | · | x3 | + | | · | x4 |
The following usable rules [FROCOS05] were oriented:
function(p, s(0), dummy, dummy2) → 0
function(p, s(s(x)), dummy, dummy2) → s(function(p, s(x), x, x))
(46) Obligation:
Q DP problem:
The TRS P consists of the following rules:
FUNCTION(plus, s(x0), s(s(y_0)), s(s(x0))) → FUNCTION(if, false, s(s(y_0)), s(s(x0)))
The TRS R consists of the following rules:
function(p, s(0), dummy, dummy2) → 0
function(p, s(s(x)), dummy, dummy2) → s(function(p, s(x), x, x))
The set Q consists of the following terms:
function(iszero, 0, x0, x1)
function(iszero, s(x0), x1, x2)
function(p, 0, x0, x1)
function(p, s(0), x0, x1)
function(p, s(s(x0)), x1, x2)
function(plus, x0, x1, x2)
function(if, true, x0, x1)
function(if, false, x0, x1)
function(third, x0, x1, x2)
We have to consider all minimal (P,Q,R)-chains.
(47) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.
(48) TRUE