Termination w.r.t. Q of the following Term Rewriting System could be proven:
Q restricted rewrite system:
The TRS R consists of the following rules:
diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
↳ QTRS
↳ DependencyPairsProof
Q restricted rewrite system:
The TRS R consists of the following rules:
diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:
EQUAL(s(x), s(y)) → EQUAL(x, y)
COND2(false, x, y) → DIFF(s(x), y)
GT(s(u), s(v)) → GT(u, v)
COND1(false, x, y) → COND2(gt(x, y), x, y)
DIFF(x, y) → EQUAL(x, y)
COND1(false, x, y) → GT(x, y)
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
The TRS R consists of the following rules:
diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
We have to consider all minimal (P,Q,R)-chains.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
EQUAL(s(x), s(y)) → EQUAL(x, y)
COND2(false, x, y) → DIFF(s(x), y)
GT(s(u), s(v)) → GT(u, v)
COND1(false, x, y) → COND2(gt(x, y), x, y)
DIFF(x, y) → EQUAL(x, y)
COND1(false, x, y) → GT(x, y)
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
The TRS R consists of the following rules:
diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 3 SCCs with 2 less nodes.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
EQUAL(s(x), s(y)) → EQUAL(x, y)
The TRS R consists of the following rules:
diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [13] we can delete all non-usable rules [14] from R.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
EQUAL(s(x), s(y)) → EQUAL(x, y)
R is empty.
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
EQUAL(s(x), s(y)) → EQUAL(x, y)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [16] together with the size-change analysis [27] 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:
- EQUAL(s(x), s(y)) → EQUAL(x, y)
The graph contains the following edges 1 > 1, 2 > 2
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
GT(s(u), s(v)) → GT(u, v)
The TRS R consists of the following rules:
diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [13] we can delete all non-usable rules [14] from R.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
GT(s(u), s(v)) → GT(u, v)
R is empty.
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
GT(s(u), s(v)) → GT(u, v)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [16] together with the size-change analysis [27] 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:
- GT(s(u), s(v)) → GT(u, v)
The graph contains the following edges 1 > 1, 2 > 2
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
Q DP problem:
The TRS P consists of the following rules:
COND2(false, x, y) → DIFF(s(x), y)
COND1(false, x, y) → COND2(gt(x, y), x, y)
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
The TRS R consists of the following rules:
diff(x, y) → cond1(equal(x, y), x, y)
cond1(true, x, y) → 0
cond1(false, x, y) → cond2(gt(x, y), x, y)
cond2(true, x, y) → s(diff(x, s(y)))
cond2(false, x, y) → s(diff(s(x), y))
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [13] we can delete all non-usable rules [14] from R.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
Q DP problem:
The TRS P consists of the following rules:
COND2(false, x, y) → DIFF(s(x), y)
COND1(false, x, y) → COND2(gt(x, y), x, y)
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
cond2(false, x0, x1)
equal(s(x0), s(x1))
cond1(false, x0, x1)
diff(x0, x1)
equal(0, s(x0))
cond1(true, x0, x1)
gt(s(x0), 0)
cond2(true, x0, x1)
We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.
cond2(false, x0, x1)
cond1(false, x0, x1)
diff(x0, x1)
cond1(true, x0, x1)
cond2(true, x0, x1)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ Narrowing
↳ NonInfProof
Q DP problem:
The TRS P consists of the following rules:
COND2(false, x, y) → DIFF(s(x), y)
COND1(false, x, y) → COND2(gt(x, y), x, y)
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
equal(s(x0), s(x1))
equal(0, s(x0))
gt(s(x0), 0)
We have to consider all minimal (P,Q,R)-chains.
By narrowing [13] the rule COND1(false, x, y) → COND2(gt(x, y), x, y) at position [0] we obtained the following new rules:
COND1(false, s(x0), 0) → COND2(true, s(x0), 0)
COND1(false, 0, x0) → COND2(false, 0, x0)
COND1(false, s(x0), s(x1)) → COND2(gt(x0, x1), s(x0), s(x1))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ NonInfProof
Q DP problem:
The TRS P consists of the following rules:
COND1(false, 0, x0) → COND2(false, 0, x0)
COND1(false, s(x0), 0) → COND2(true, s(x0), 0)
COND2(false, x, y) → DIFF(s(x), y)
COND1(false, s(x0), s(x1)) → COND2(gt(x0, x1), s(x0), s(x1))
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
equal(s(x0), s(x1))
equal(0, s(x0))
gt(s(x0), 0)
We have to consider all minimal (P,Q,R)-chains.
By narrowing [13] the rule DIFF(x, y) → COND1(equal(x, y), x, y) at position [0] we obtained the following new rules:
DIFF(s(x0), s(x1)) → COND1(equal(x0, x1), s(x0), s(x1))
DIFF(0, s(x0)) → COND1(false, 0, s(x0))
DIFF(s(x0), 0) → COND1(false, s(x0), 0)
DIFF(0, 0) → COND1(true, 0, 0)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ NonInfProof
Q DP problem:
The TRS P consists of the following rules:
DIFF(s(x0), 0) → COND1(false, s(x0), 0)
DIFF(0, s(x0)) → COND1(false, 0, s(x0))
COND2(false, x, y) → DIFF(s(x), y)
COND1(false, s(x0), 0) → COND2(true, s(x0), 0)
COND1(false, 0, x0) → COND2(false, 0, x0)
DIFF(0, 0) → COND1(true, 0, 0)
COND1(false, s(x0), s(x1)) → COND2(gt(x0, x1), s(x0), s(x1))
DIFF(s(x0), s(x1)) → COND1(equal(x0, x1), s(x0), s(x1))
COND2(true, x, y) → DIFF(x, s(y))
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
equal(s(x0), s(x1))
equal(0, s(x0))
gt(s(x0), 0)
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 1 less node.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ NonInfProof
Q DP problem:
The TRS P consists of the following rules:
COND1(false, s(x0), 0) → COND2(true, s(x0), 0)
DIFF(s(x0), 0) → COND1(false, s(x0), 0)
COND2(false, x, y) → DIFF(s(x), y)
COND1(false, 0, x0) → COND2(false, 0, x0)
DIFF(0, s(x0)) → COND1(false, 0, s(x0))
COND1(false, s(x0), s(x1)) → COND2(gt(x0, x1), s(x0), s(x1))
DIFF(s(x0), s(x1)) → COND1(equal(x0, x1), s(x0), s(x1))
COND2(true, x, y) → DIFF(x, s(y))
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
equal(s(x0), s(x1))
equal(0, s(x0))
gt(s(x0), 0)
We have to consider all minimal (P,Q,R)-chains.
By instantiating [13] the rule COND2(true, x, y) → DIFF(x, s(y)) we obtained the following new rules:
COND2(true, s(z0), s(z1)) → DIFF(s(z0), s(s(z1)))
COND2(true, s(z0), 0) → DIFF(s(z0), s(0))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ DependencyGraphProof
↳ NonInfProof
Q DP problem:
The TRS P consists of the following rules:
DIFF(0, s(x0)) → COND1(false, 0, s(x0))
COND1(false, 0, x0) → COND2(false, 0, x0)
COND2(false, x, y) → DIFF(s(x), y)
DIFF(s(x0), 0) → COND1(false, s(x0), 0)
COND1(false, s(x0), 0) → COND2(true, s(x0), 0)
COND1(false, s(x0), s(x1)) → COND2(gt(x0, x1), s(x0), s(x1))
COND2(true, s(z0), s(z1)) → DIFF(s(z0), s(s(z1)))
DIFF(s(x0), s(x1)) → COND1(equal(x0, x1), s(x0), s(x1))
COND2(true, s(z0), 0) → DIFF(s(z0), s(0))
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
equal(s(x0), s(x1))
equal(0, s(x0))
gt(s(x0), 0)
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 2 less nodes.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ NonInfProof
Q DP problem:
The TRS P consists of the following rules:
COND1(false, s(x0), 0) → COND2(true, s(x0), 0)
DIFF(s(x0), 0) → COND1(false, s(x0), 0)
COND2(false, x, y) → DIFF(s(x), y)
COND1(false, s(x0), s(x1)) → COND2(gt(x0, x1), s(x0), s(x1))
COND2(true, s(z0), s(z1)) → DIFF(s(z0), s(s(z1)))
DIFF(s(x0), s(x1)) → COND1(equal(x0, x1), s(x0), s(x1))
COND2(true, s(z0), 0) → DIFF(s(z0), s(0))
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
equal(s(x0), s(x1))
equal(0, s(x0))
gt(s(x0), 0)
We have to consider all minimal (P,Q,R)-chains.
By instantiating [13] the rule COND2(false, x, y) → DIFF(s(x), y) we obtained the following new rules:
COND2(false, s(z0), s(z1)) → DIFF(s(s(z0)), s(z1))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ DependencyGraphProof
↳ NonInfProof
Q DP problem:
The TRS P consists of the following rules:
COND2(false, s(z0), s(z1)) → DIFF(s(s(z0)), s(z1))
DIFF(s(x0), 0) → COND1(false, s(x0), 0)
COND1(false, s(x0), 0) → COND2(true, s(x0), 0)
COND1(false, s(x0), s(x1)) → COND2(gt(x0, x1), s(x0), s(x1))
COND2(true, s(z0), s(z1)) → DIFF(s(z0), s(s(z1)))
DIFF(s(x0), s(x1)) → COND1(equal(x0, x1), s(x0), s(x1))
COND2(true, s(z0), 0) → DIFF(s(z0), s(0))
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
equal(s(x0), s(x1))
equal(0, s(x0))
gt(s(x0), 0)
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 1 SCC with 3 less nodes.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ NonInfProof
Q DP problem:
The TRS P consists of the following rules:
COND2(false, s(z0), s(z1)) → DIFF(s(s(z0)), s(z1))
COND1(false, s(x0), s(x1)) → COND2(gt(x0, x1), s(x0), s(x1))
COND2(true, s(z0), s(z1)) → DIFF(s(z0), s(s(z1)))
DIFF(s(x0), s(x1)) → COND1(equal(x0, x1), s(x0), s(x1))
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
equal(s(x0), s(x1))
equal(0, s(x0))
gt(s(x0), 0)
We have to consider all minimal (P,Q,R)-chains.
By instantiating [13] the rule DIFF(s(x0), s(x1)) → COND1(equal(x0, x1), s(x0), s(x1)) we obtained the following new rules:
DIFF(s(s(z0)), s(z1)) → COND1(equal(s(z0), z1), s(s(z0)), s(z1))
DIFF(s(z0), s(s(z1))) → COND1(equal(z0, s(z1)), s(z0), s(s(z1)))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ Instantiation
↳ NonInfProof
Q DP problem:
The TRS P consists of the following rules:
COND2(false, s(z0), s(z1)) → DIFF(s(s(z0)), s(z1))
DIFF(s(s(z0)), s(z1)) → COND1(equal(s(z0), z1), s(s(z0)), s(z1))
COND1(false, s(x0), s(x1)) → COND2(gt(x0, x1), s(x0), s(x1))
DIFF(s(z0), s(s(z1))) → COND1(equal(z0, s(z1)), s(z0), s(s(z1)))
COND2(true, s(z0), s(z1)) → DIFF(s(z0), s(s(z1)))
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
equal(s(x0), s(x1))
equal(0, s(x0))
gt(s(x0), 0)
We have to consider all minimal (P,Q,R)-chains.
By instantiating [13] the rule COND1(false, s(x0), s(x1)) → COND2(gt(x0, x1), s(x0), s(x1)) we obtained the following new rules:
COND1(false, s(s(z0)), s(z1)) → COND2(gt(s(z0), z1), s(s(z0)), s(z1))
COND1(false, s(z0), s(s(z1))) → COND2(gt(z0, s(z1)), s(z0), s(s(z1)))
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ Narrowing
↳ QDP
↳ Narrowing
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Instantiation
↳ QDP
↳ Instantiation
↳ QDP
↳ NonInfProof
Q DP problem:
The TRS P consists of the following rules:
COND2(false, s(z0), s(z1)) → DIFF(s(s(z0)), s(z1))
COND1(false, s(s(z0)), s(z1)) → COND2(gt(s(z0), z1), s(s(z0)), s(z1))
DIFF(s(s(z0)), s(z1)) → COND1(equal(s(z0), z1), s(s(z0)), s(z1))
COND1(false, s(z0), s(s(z1))) → COND2(gt(z0, s(z1)), s(z0), s(s(z1)))
DIFF(s(z0), s(s(z1))) → COND1(equal(z0, s(z1)), s(z0), s(s(z1)))
COND2(true, s(z0), s(z1)) → DIFF(s(z0), s(s(z1)))
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
equal(s(x0), s(x1))
equal(0, s(x0))
gt(s(x0), 0)
We have to consider all minimal (P,Q,R)-chains.
The DP Problem is simplified using the Induction Calculus with the following steps:
Note that final constraints are written in bold face.
For Pair COND2(false, x, y) → DIFF(s(x), y) the following chains were created:
- We consider the chain DIFF(x, y) → COND1(equal(x, y), x, y), COND1(false, x, y) → COND2(gt(x, y), x, y), COND2(false, x, y) → DIFF(s(x), y) which results in the following constraint:
- (1) (COND1(equal(x16, x17), x16, x17)=COND1(false, x18, x19)∧COND2(gt(x18, x19), x18, x19)=COND2(false, x20, x21) ⇒ COND2(false, x20, x21)≥DIFF(s(x20), x21))
We simplified constraint (1) using rules (I), (II), (III) which results in the following new constraint:
- (2) (equal(x18, x19)=false∧gt(x18, x19)=false ⇒ COND2(false, x18, x19)≥DIFF(s(x18), x19))
We simplified constraint (2) using rule (V) (with possible (I) afterwards) using induction on equal(x18, x19)=false which results in the following new constraints:
- (3) (false=false∧gt(s(x180), 0)=false ⇒ COND2(false, s(x180), 0)≥DIFF(s(s(x180)), 0))
- (4) (false=false∧gt(0, s(x181))=false ⇒ COND2(false, 0, s(x181))≥DIFF(s(0), s(x181)))
- (5) (equal(x182, x183)=false∧gt(s(x182), s(x183))=false∧(equal(x182, x183)=false∧gt(x182, x183)=false ⇒ COND2(false, x182, x183)≥DIFF(s(x182), x183)) ⇒ COND2(false, s(x182), s(x183))≥DIFF(s(s(x182)), s(x183)))
We simplified constraint (3) using rules (I), (II), (VII) which results in the following new constraint:
- (6) (s(x180)=x184∧0=x185∧gt(x184, x185)=false ⇒ COND2(false, s(x180), 0)≥DIFF(s(s(x180)), 0))
We simplified constraint (4) using rules (I), (II), (VII) which results in the following new constraint:
- (7) (0=x191∧s(x181)=x192∧gt(x191, x192)=false ⇒ COND2(false, 0, s(x181))≥DIFF(s(0), s(x181)))
We simplified constraint (5) using rule (VII) which results in the following new constraint:
- (8) (equal(x182, x183)=false∧s(x182)=x198∧s(x183)=x199∧gt(x198, x199)=false∧(equal(x182, x183)=false∧gt(x182, x183)=false ⇒ COND2(false, x182, x183)≥DIFF(s(x182), x183)) ⇒ COND2(false, s(x182), s(x183))≥DIFF(s(s(x182)), s(x183)))
We simplified constraint (6) using rule (V) (with possible (I) afterwards) using induction on gt(x184, x185)=false which results in the following new constraints:
- (9) (false=false∧s(x180)=0∧0=x186 ⇒ COND2(false, s(x180), 0)≥DIFF(s(s(x180)), 0))
- (10) (gt(x188, x189)=false∧s(x180)=s(x188)∧0=s(x189)∧(∀x190:gt(x188, x189)=false∧s(x190)=x188∧0=x189 ⇒ COND2(false, s(x190), 0)≥DIFF(s(s(x190)), 0)) ⇒ COND2(false, s(x180), 0)≥DIFF(s(s(x180)), 0))
We solved constraint (9) using rules (I), (II).We solved constraint (10) using rules (I), (II).We simplified constraint (7) using rule (V) (with possible (I) afterwards) using induction on gt(x191, x192)=false which results in the following new constraints:
- (11) (false=false∧0=0∧s(x181)=x193 ⇒ COND2(false, 0, s(x181))≥DIFF(s(0), s(x181)))
- (12) (gt(x195, x196)=false∧0=s(x195)∧s(x181)=s(x196)∧(∀x197:gt(x195, x196)=false∧0=x195∧s(x197)=x196 ⇒ COND2(false, 0, s(x197))≥DIFF(s(0), s(x197))) ⇒ COND2(false, 0, s(x181))≥DIFF(s(0), s(x181)))
We simplified constraint (11) using rules (I), (II), (IV) which results in the following new constraint:
- (13) (COND2(false, 0, s(x181))≥DIFF(s(0), s(x181)))
We solved constraint (12) using rules (I), (II).We simplified constraint (8) using rule (V) (with possible (I) afterwards) using induction on gt(x198, x199)=false which results in the following new constraints:
- (14) (false=false∧equal(x182, x183)=false∧s(x182)=0∧s(x183)=x200∧(equal(x182, x183)=false∧gt(x182, x183)=false ⇒ COND2(false, x182, x183)≥DIFF(s(x182), x183)) ⇒ COND2(false, s(x182), s(x183))≥DIFF(s(s(x182)), s(x183)))
- (15) (gt(x202, x203)=false∧equal(x182, x183)=false∧s(x182)=s(x202)∧s(x183)=s(x203)∧(equal(x182, x183)=false∧gt(x182, x183)=false ⇒ COND2(false, x182, x183)≥DIFF(s(x182), x183))∧(∀x204,x205:gt(x202, x203)=false∧equal(x204, x205)=false∧s(x204)=x202∧s(x205)=x203∧(equal(x204, x205)=false∧gt(x204, x205)=false ⇒ COND2(false, x204, x205)≥DIFF(s(x204), x205)) ⇒ COND2(false, s(x204), s(x205))≥DIFF(s(s(x204)), s(x205))) ⇒ COND2(false, s(x182), s(x183))≥DIFF(s(s(x182)), s(x183)))
We solved constraint (14) using rules (I), (II).We simplified constraint (15) using rules (I), (II), (III) which results in the following new constraint:
- (16) (gt(x202, x203)=false∧equal(x202, x203)=false∧(equal(x202, x203)=false∧gt(x202, x203)=false ⇒ COND2(false, x202, x203)≥DIFF(s(x202), x203))∧(∀x204,x205:gt(x202, x203)=false∧equal(x204, x205)=false∧s(x204)=x202∧s(x205)=x203∧(equal(x204, x205)=false∧gt(x204, x205)=false ⇒ COND2(false, x204, x205)≥DIFF(s(x204), x205)) ⇒ COND2(false, s(x204), s(x205))≥DIFF(s(s(x204)), s(x205))) ⇒ COND2(false, s(x202), s(x203))≥DIFF(s(s(x202)), s(x203)))
We simplified constraint (16) using rule (VI) where we applied the induction hypothesis (equal(x202, x203)=false∧gt(x202, x203)=false ⇒ COND2(false, x202, x203)≥DIFF(s(x202), x203)) with σ = [ ] which results in the following new constraint:
- (17) (COND2(false, x202, x203)≥DIFF(s(x202), x203)∧(∀x204,x205:gt(x202, x203)=false∧equal(x204, x205)=false∧s(x204)=x202∧s(x205)=x203∧(equal(x204, x205)=false∧gt(x204, x205)=false ⇒ COND2(false, x204, x205)≥DIFF(s(x204), x205)) ⇒ COND2(false, s(x204), s(x205))≥DIFF(s(s(x204)), s(x205))) ⇒ COND2(false, s(x202), s(x203))≥DIFF(s(s(x202)), s(x203)))
We simplified constraint (17) using rule (IV) which results in the following new constraint:
- (18) (COND2(false, x202, x203)≥DIFF(s(x202), x203) ⇒ COND2(false, s(x202), s(x203))≥DIFF(s(s(x202)), s(x203)))
For Pair COND1(false, x, y) → COND2(gt(x, y), x, y) the following chains were created:
- We consider the chain COND2(false, x, y) → DIFF(s(x), y), DIFF(x, y) → COND1(equal(x, y), x, y), COND1(false, x, y) → COND2(gt(x, y), x, y) which results in the following constraint:
- (19) (DIFF(s(x74), x75)=DIFF(x76, x77)∧COND1(equal(x76, x77), x76, x77)=COND1(false, x78, x79) ⇒ COND1(false, x78, x79)≥COND2(gt(x78, x79), x78, x79))
We simplified constraint (19) using rules (I), (II), (III) which results in the following new constraint:
- (20) (s(x74)=x76∧equal(x76, x77)=false ⇒ COND1(false, x76, x77)≥COND2(gt(x76, x77), x76, x77))
We simplified constraint (20) using rule (V) (with possible (I) afterwards) using induction on equal(x76, x77)=false which results in the following new constraints:
- (21) (false=false∧s(x74)=s(x206) ⇒ COND1(false, s(x206), 0)≥COND2(gt(s(x206), 0), s(x206), 0))
- (22) (false=false∧s(x74)=0 ⇒ COND1(false, 0, s(x207))≥COND2(gt(0, s(x207)), 0, s(x207)))
- (23) (equal(x208, x209)=false∧s(x74)=s(x208)∧(∀x210:equal(x208, x209)=false∧s(x210)=x208 ⇒ COND1(false, x208, x209)≥COND2(gt(x208, x209), x208, x209)) ⇒ COND1(false, s(x208), s(x209))≥COND2(gt(s(x208), s(x209)), s(x208), s(x209)))
We simplified constraint (21) using rules (I), (II), (III) which results in the following new constraint:
- (24) (COND1(false, s(x74), 0)≥COND2(gt(s(x74), 0), s(x74), 0))
We solved constraint (22) using rules (I), (II).We simplified constraint (23) using rules (I), (II), (III), (IV) which results in the following new constraint:
- (25) (equal(x208, x209)=false ⇒ COND1(false, s(x208), s(x209))≥COND2(gt(s(x208), s(x209)), s(x208), s(x209)))
We simplified constraint (25) using rule (V) (with possible (I) afterwards) using induction on equal(x208, x209)=false which results in the following new constraints:
- (26) (false=false ⇒ COND1(false, s(s(x211)), s(0))≥COND2(gt(s(s(x211)), s(0)), s(s(x211)), s(0)))
- (27) (false=false ⇒ COND1(false, s(0), s(s(x212)))≥COND2(gt(s(0), s(s(x212))), s(0), s(s(x212))))
- (28) (equal(x213, x214)=false∧(equal(x213, x214)=false ⇒ COND1(false, s(x213), s(x214))≥COND2(gt(s(x213), s(x214)), s(x213), s(x214))) ⇒ COND1(false, s(s(x213)), s(s(x214)))≥COND2(gt(s(s(x213)), s(s(x214))), s(s(x213)), s(s(x214))))
We simplified constraint (26) using rules (I), (II) which results in the following new constraint:
- (29) (COND1(false, s(s(x211)), s(0))≥COND2(gt(s(s(x211)), s(0)), s(s(x211)), s(0)))
We simplified constraint (27) using rules (I), (II) which results in the following new constraint:
- (30) (COND1(false, s(0), s(s(x212)))≥COND2(gt(s(0), s(s(x212))), s(0), s(s(x212))))
We simplified constraint (28) using rule (VI) where we applied the induction hypothesis (equal(x213, x214)=false ⇒ COND1(false, s(x213), s(x214))≥COND2(gt(s(x213), s(x214)), s(x213), s(x214))) with σ = [ ] which results in the following new constraint:
- (31) (COND1(false, s(x213), s(x214))≥COND2(gt(s(x213), s(x214)), s(x213), s(x214)) ⇒ COND1(false, s(s(x213)), s(s(x214)))≥COND2(gt(s(s(x213)), s(s(x214))), s(s(x213)), s(s(x214))))
- We consider the chain COND2(true, x, y) → DIFF(x, s(y)), DIFF(x, y) → COND1(equal(x, y), x, y), COND1(false, x, y) → COND2(gt(x, y), x, y) which results in the following constraint:
- (32) (DIFF(x82, s(x83))=DIFF(x84, x85)∧COND1(equal(x84, x85), x84, x85)=COND1(false, x86, x87) ⇒ COND1(false, x86, x87)≥COND2(gt(x86, x87), x86, x87))
We simplified constraint (32) using rules (I), (II), (III) which results in the following new constraint:
- (33) (s(x83)=x85∧equal(x84, x85)=false ⇒ COND1(false, x84, x85)≥COND2(gt(x84, x85), x84, x85))
We simplified constraint (33) using rule (V) (with possible (I) afterwards) using induction on equal(x84, x85)=false which results in the following new constraints:
- (34) (false=false∧s(x83)=0 ⇒ COND1(false, s(x215), 0)≥COND2(gt(s(x215), 0), s(x215), 0))
- (35) (false=false∧s(x83)=s(x216) ⇒ COND1(false, 0, s(x216))≥COND2(gt(0, s(x216)), 0, s(x216)))
- (36) (equal(x217, x218)=false∧s(x83)=s(x218)∧(∀x219:equal(x217, x218)=false∧s(x219)=x218 ⇒ COND1(false, x217, x218)≥COND2(gt(x217, x218), x217, x218)) ⇒ COND1(false, s(x217), s(x218))≥COND2(gt(s(x217), s(x218)), s(x217), s(x218)))
We solved constraint (34) using rules (I), (II).We simplified constraint (35) using rules (I), (II), (III) which results in the following new constraint:
- (37) (COND1(false, 0, s(x83))≥COND2(gt(0, s(x83)), 0, s(x83)))
We simplified constraint (36) using rules (I), (II), (III), (IV) which results in the following new constraint:
- (38) (equal(x217, x218)=false ⇒ COND1(false, s(x217), s(x218))≥COND2(gt(s(x217), s(x218)), s(x217), s(x218)))
We simplified constraint (38) using rule (V) (with possible (I) afterwards) using induction on equal(x217, x218)=false which results in the following new constraints:
- (39) (false=false ⇒ COND1(false, s(s(x220)), s(0))≥COND2(gt(s(s(x220)), s(0)), s(s(x220)), s(0)))
- (40) (false=false ⇒ COND1(false, s(0), s(s(x221)))≥COND2(gt(s(0), s(s(x221))), s(0), s(s(x221))))
- (41) (equal(x222, x223)=false∧(equal(x222, x223)=false ⇒ COND1(false, s(x222), s(x223))≥COND2(gt(s(x222), s(x223)), s(x222), s(x223))) ⇒ COND1(false, s(s(x222)), s(s(x223)))≥COND2(gt(s(s(x222)), s(s(x223))), s(s(x222)), s(s(x223))))
We simplified constraint (39) using rules (I), (II) which results in the following new constraint:
- (42) (COND1(false, s(s(x220)), s(0))≥COND2(gt(s(s(x220)), s(0)), s(s(x220)), s(0)))
We simplified constraint (40) using rules (I), (II) which results in the following new constraint:
- (43) (COND1(false, s(0), s(s(x221)))≥COND2(gt(s(0), s(s(x221))), s(0), s(s(x221))))
We simplified constraint (41) using rule (VI) where we applied the induction hypothesis (equal(x222, x223)=false ⇒ COND1(false, s(x222), s(x223))≥COND2(gt(s(x222), s(x223)), s(x222), s(x223))) with σ = [ ] which results in the following new constraint:
- (44) (COND1(false, s(x222), s(x223))≥COND2(gt(s(x222), s(x223)), s(x222), s(x223)) ⇒ COND1(false, s(s(x222)), s(s(x223)))≥COND2(gt(s(s(x222)), s(s(x223))), s(s(x222)), s(s(x223))))
For Pair COND2(true, x, y) → DIFF(x, s(y)) the following chains were created:
- We consider the chain DIFF(x, y) → COND1(equal(x, y), x, y), COND1(false, x, y) → COND2(gt(x, y), x, y), COND2(true, x, y) → DIFF(x, s(y)) which results in the following constraint:
- (45) (COND1(equal(x106, x107), x106, x107)=COND1(false, x108, x109)∧COND2(gt(x108, x109), x108, x109)=COND2(true, x110, x111) ⇒ COND2(true, x110, x111)≥DIFF(x110, s(x111)))
We simplified constraint (45) using rules (I), (II), (III) which results in the following new constraint:
- (46) (equal(x108, x109)=false∧gt(x108, x109)=true ⇒ COND2(true, x108, x109)≥DIFF(x108, s(x109)))
We simplified constraint (46) using rule (V) (with possible (I) afterwards) using induction on equal(x108, x109)=false which results in the following new constraints:
- (47) (false=false∧gt(s(x224), 0)=true ⇒ COND2(true, s(x224), 0)≥DIFF(s(x224), s(0)))
- (48) (false=false∧gt(0, s(x225))=true ⇒ COND2(true, 0, s(x225))≥DIFF(0, s(s(x225))))
- (49) (equal(x226, x227)=false∧gt(s(x226), s(x227))=true∧(equal(x226, x227)=false∧gt(x226, x227)=true ⇒ COND2(true, x226, x227)≥DIFF(x226, s(x227))) ⇒ COND2(true, s(x226), s(x227))≥DIFF(s(x226), s(s(x227))))
We simplified constraint (47) using rules (I), (II), (VII) which results in the following new constraint:
- (50) (s(x224)=x228∧0=x229∧gt(x228, x229)=true ⇒ COND2(true, s(x224), 0)≥DIFF(s(x224), s(0)))
We simplified constraint (48) using rules (I), (II), (VII) which results in the following new constraint:
- (51) (0=x235∧s(x225)=x236∧gt(x235, x236)=true ⇒ COND2(true, 0, s(x225))≥DIFF(0, s(s(x225))))
We simplified constraint (49) using rule (VII) which results in the following new constraint:
- (52) (equal(x226, x227)=false∧s(x226)=x242∧s(x227)=x243∧gt(x242, x243)=true∧(equal(x226, x227)=false∧gt(x226, x227)=true ⇒ COND2(true, x226, x227)≥DIFF(x226, s(x227))) ⇒ COND2(true, s(x226), s(x227))≥DIFF(s(x226), s(s(x227))))
We simplified constraint (50) using rule (V) (with possible (I) afterwards) using induction on gt(x228, x229)=true which results in the following new constraints:
- (53) (true=true∧s(x224)=s(x231)∧0=0 ⇒ COND2(true, s(x224), 0)≥DIFF(s(x224), s(0)))
- (54) (gt(x232, x233)=true∧s(x224)=s(x232)∧0=s(x233)∧(∀x234:gt(x232, x233)=true∧s(x234)=x232∧0=x233 ⇒ COND2(true, s(x234), 0)≥DIFF(s(x234), s(0))) ⇒ COND2(true, s(x224), 0)≥DIFF(s(x224), s(0)))
We simplified constraint (53) using rules (I), (II), (IV) which results in the following new constraint:
- (55) (COND2(true, s(x224), 0)≥DIFF(s(x224), s(0)))
We solved constraint (54) using rules (I), (II).We simplified constraint (51) using rule (V) (with possible (I) afterwards) using induction on gt(x235, x236)=true which results in the following new constraints:
- (56) (true=true∧0=s(x238)∧s(x225)=0 ⇒ COND2(true, 0, s(x225))≥DIFF(0, s(s(x225))))
- (57) (gt(x239, x240)=true∧0=s(x239)∧s(x225)=s(x240)∧(∀x241:gt(x239, x240)=true∧0=x239∧s(x241)=x240 ⇒ COND2(true, 0, s(x241))≥DIFF(0, s(s(x241)))) ⇒ COND2(true, 0, s(x225))≥DIFF(0, s(s(x225))))
We solved constraint (56) using rules (I), (II).We solved constraint (57) using rules (I), (II).We simplified constraint (52) using rule (V) (with possible (I) afterwards) using induction on gt(x242, x243)=true which results in the following new constraints:
- (58) (true=true∧equal(x226, x227)=false∧s(x226)=s(x245)∧s(x227)=0∧(equal(x226, x227)=false∧gt(x226, x227)=true ⇒ COND2(true, x226, x227)≥DIFF(x226, s(x227))) ⇒ COND2(true, s(x226), s(x227))≥DIFF(s(x226), s(s(x227))))
- (59) (gt(x246, x247)=true∧equal(x226, x227)=false∧s(x226)=s(x246)∧s(x227)=s(x247)∧(equal(x226, x227)=false∧gt(x226, x227)=true ⇒ COND2(true, x226, x227)≥DIFF(x226, s(x227)))∧(∀x248,x249:gt(x246, x247)=true∧equal(x248, x249)=false∧s(x248)=x246∧s(x249)=x247∧(equal(x248, x249)=false∧gt(x248, x249)=true ⇒ COND2(true, x248, x249)≥DIFF(x248, s(x249))) ⇒ COND2(true, s(x248), s(x249))≥DIFF(s(x248), s(s(x249)))) ⇒ COND2(true, s(x226), s(x227))≥DIFF(s(x226), s(s(x227))))
We solved constraint (58) using rules (I), (II).We simplified constraint (59) using rules (I), (II), (III) which results in the following new constraint:
- (60) (gt(x246, x247)=true∧equal(x246, x247)=false∧(equal(x246, x247)=false∧gt(x246, x247)=true ⇒ COND2(true, x246, x247)≥DIFF(x246, s(x247)))∧(∀x248,x249:gt(x246, x247)=true∧equal(x248, x249)=false∧s(x248)=x246∧s(x249)=x247∧(equal(x248, x249)=false∧gt(x248, x249)=true ⇒ COND2(true, x248, x249)≥DIFF(x248, s(x249))) ⇒ COND2(true, s(x248), s(x249))≥DIFF(s(x248), s(s(x249)))) ⇒ COND2(true, s(x246), s(x247))≥DIFF(s(x246), s(s(x247))))
We simplified constraint (60) using rule (VI) where we applied the induction hypothesis (equal(x246, x247)=false∧gt(x246, x247)=true ⇒ COND2(true, x246, x247)≥DIFF(x246, s(x247))) with σ = [ ] which results in the following new constraint:
- (61) (COND2(true, x246, x247)≥DIFF(x246, s(x247))∧(∀x248,x249:gt(x246, x247)=true∧equal(x248, x249)=false∧s(x248)=x246∧s(x249)=x247∧(equal(x248, x249)=false∧gt(x248, x249)=true ⇒ COND2(true, x248, x249)≥DIFF(x248, s(x249))) ⇒ COND2(true, s(x248), s(x249))≥DIFF(s(x248), s(s(x249)))) ⇒ COND2(true, s(x246), s(x247))≥DIFF(s(x246), s(s(x247))))
We simplified constraint (61) using rule (IV) which results in the following new constraint:
- (62) (COND2(true, x246, x247)≥DIFF(x246, s(x247)) ⇒ COND2(true, s(x246), s(x247))≥DIFF(s(x246), s(s(x247))))
For Pair DIFF(x, y) → COND1(equal(x, y), x, y) the following chains were created:
- We consider the chain COND1(false, x, y) → COND2(gt(x, y), x, y), COND2(false, x, y) → DIFF(s(x), y), DIFF(x, y) → COND1(equal(x, y), x, y) which results in the following constraint:
- (63) (COND2(gt(x136, x137), x136, x137)=COND2(false, x138, x139)∧DIFF(s(x138), x139)=DIFF(x140, x141) ⇒ DIFF(x140, x141)≥COND1(equal(x140, x141), x140, x141))
We simplified constraint (63) using rules (I), (II), (III) which results in the following new constraint:
- (64) (gt(x136, x137)=false ⇒ DIFF(s(x136), x137)≥COND1(equal(s(x136), x137), s(x136), x137))
We simplified constraint (64) using rule (V) (with possible (I) afterwards) using induction on gt(x136, x137)=false which results in the following new constraints:
- (65) (false=false ⇒ DIFF(s(0), x250)≥COND1(equal(s(0), x250), s(0), x250))
- (66) (gt(x252, x253)=false∧(gt(x252, x253)=false ⇒ DIFF(s(x252), x253)≥COND1(equal(s(x252), x253), s(x252), x253)) ⇒ DIFF(s(s(x252)), s(x253))≥COND1(equal(s(s(x252)), s(x253)), s(s(x252)), s(x253)))
We simplified constraint (65) using rules (I), (II) which results in the following new constraint:
- (67) (DIFF(s(0), x250)≥COND1(equal(s(0), x250), s(0), x250))
We simplified constraint (66) using rule (VI) where we applied the induction hypothesis (gt(x252, x253)=false ⇒ DIFF(s(x252), x253)≥COND1(equal(s(x252), x253), s(x252), x253)) with σ = [ ] which results in the following new constraint:
- (68) (DIFF(s(x252), x253)≥COND1(equal(s(x252), x253), s(x252), x253) ⇒ DIFF(s(s(x252)), s(x253))≥COND1(equal(s(s(x252)), s(x253)), s(s(x252)), s(x253)))
- We consider the chain COND1(false, x, y) → COND2(gt(x, y), x, y), COND2(true, x, y) → DIFF(x, s(y)), DIFF(x, y) → COND1(equal(x, y), x, y) which results in the following constraint:
- (69) (COND2(gt(x158, x159), x158, x159)=COND2(true, x160, x161)∧DIFF(x160, s(x161))=DIFF(x162, x163) ⇒ DIFF(x162, x163)≥COND1(equal(x162, x163), x162, x163))
We simplified constraint (69) using rules (I), (II), (III) which results in the following new constraint:
- (70) (gt(x158, x159)=true ⇒ DIFF(x158, s(x159))≥COND1(equal(x158, s(x159)), x158, s(x159)))
We simplified constraint (70) using rule (V) (with possible (I) afterwards) using induction on gt(x158, x159)=true which results in the following new constraints:
- (71) (true=true ⇒ DIFF(s(x255), s(0))≥COND1(equal(s(x255), s(0)), s(x255), s(0)))
- (72) (gt(x256, x257)=true∧(gt(x256, x257)=true ⇒ DIFF(x256, s(x257))≥COND1(equal(x256, s(x257)), x256, s(x257))) ⇒ DIFF(s(x256), s(s(x257)))≥COND1(equal(s(x256), s(s(x257))), s(x256), s(s(x257))))
We simplified constraint (71) using rules (I), (II) which results in the following new constraint:
- (73) (DIFF(s(x255), s(0))≥COND1(equal(s(x255), s(0)), s(x255), s(0)))
We simplified constraint (72) using rule (VI) where we applied the induction hypothesis (gt(x256, x257)=true ⇒ DIFF(x256, s(x257))≥COND1(equal(x256, s(x257)), x256, s(x257))) with σ = [ ] which results in the following new constraint:
- (74) (DIFF(x256, s(x257))≥COND1(equal(x256, s(x257)), x256, s(x257)) ⇒ DIFF(s(x256), s(s(x257)))≥COND1(equal(s(x256), s(s(x257))), s(x256), s(s(x257))))
To summarize, we get the following constraints P≥ for the following pairs.
- COND2(false, x, y) → DIFF(s(x), y)
- (COND2(false, 0, s(x181))≥DIFF(s(0), s(x181)))
- (COND2(false, x202, x203)≥DIFF(s(x202), x203) ⇒ COND2(false, s(x202), s(x203))≥DIFF(s(s(x202)), s(x203)))
- COND1(false, x, y) → COND2(gt(x, y), x, y)
- (COND1(false, s(x74), 0)≥COND2(gt(s(x74), 0), s(x74), 0))
- (COND1(false, s(s(x211)), s(0))≥COND2(gt(s(s(x211)), s(0)), s(s(x211)), s(0)))
- (COND1(false, s(0), s(s(x212)))≥COND2(gt(s(0), s(s(x212))), s(0), s(s(x212))))
- (COND1(false, s(x213), s(x214))≥COND2(gt(s(x213), s(x214)), s(x213), s(x214)) ⇒ COND1(false, s(s(x213)), s(s(x214)))≥COND2(gt(s(s(x213)), s(s(x214))), s(s(x213)), s(s(x214))))
- (COND1(false, 0, s(x83))≥COND2(gt(0, s(x83)), 0, s(x83)))
- (COND1(false, s(s(x220)), s(0))≥COND2(gt(s(s(x220)), s(0)), s(s(x220)), s(0)))
- (COND1(false, s(0), s(s(x221)))≥COND2(gt(s(0), s(s(x221))), s(0), s(s(x221))))
- (COND1(false, s(x222), s(x223))≥COND2(gt(s(x222), s(x223)), s(x222), s(x223)) ⇒ COND1(false, s(s(x222)), s(s(x223)))≥COND2(gt(s(s(x222)), s(s(x223))), s(s(x222)), s(s(x223))))
- COND2(true, x, y) → DIFF(x, s(y))
- (COND2(true, s(x224), 0)≥DIFF(s(x224), s(0)))
- (COND2(true, x246, x247)≥DIFF(x246, s(x247)) ⇒ COND2(true, s(x246), s(x247))≥DIFF(s(x246), s(s(x247))))
- DIFF(x, y) → COND1(equal(x, y), x, y)
- (DIFF(s(0), x250)≥COND1(equal(s(0), x250), s(0), x250))
- (DIFF(s(x252), x253)≥COND1(equal(s(x252), x253), s(x252), x253) ⇒ DIFF(s(s(x252)), s(x253))≥COND1(equal(s(s(x252)), s(x253)), s(s(x252)), s(x253)))
- (DIFF(s(x255), s(0))≥COND1(equal(s(x255), s(0)), s(x255), s(0)))
- (DIFF(x256, s(x257))≥COND1(equal(x256, s(x257)), x256, s(x257)) ⇒ DIFF(s(x256), s(s(x257)))≥COND1(equal(s(x256), s(s(x257))), s(x256), s(s(x257))))
The constraints for P> respective Pbound are constructed from P≥ where we just replace every occurence of "t ≥ s" in P≥ by "t > s" respective "t ≥ c". Here c stands for the fresh constant used for Pbound.
Using the following integer polynomial ordering the resulting constraints can be solved.
Polynomial interpretation [21]:
POL(0) = 0
POL(COND1(x1, x2, x3)) = -1 + 2·x1·x2 - 2·x1·x3 + x12 - 2·x2·x3 + x22 + x32
POL(COND2(x1, x2, x3)) = -1 + 2·x1·x2 - 2·x1·x3 + x12 - 2·x2·x3 + x22 + x32
POL(DIFF(x1, x2)) = 2 - 2·x1·x2 + x12 + x22
POL(c) = -1
POL(equal(x1, x2)) = 0
POL(false) = 0
POL(gt(x1, x2)) = 0
POL(s(x1)) = 2 + x1
POL(true) = 0
The following pairs are in P>:
COND2(false, x, y) → DIFF(s(x), y)
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
The following pairs are in Pbound:
COND2(false, x, y) → DIFF(s(x), y)
COND1(false, x, y) → COND2(gt(x, y), x, y)
COND2(true, x, y) → DIFF(x, s(y))
DIFF(x, y) → COND1(equal(x, y), x, y)
The following rules are usable:
gt(0, v) ↔ false
gt(s(u), s(v)) ↔ gt(u, v)
equal(s(x), s(y)) ↔ equal(x, y)
equal(0, s(y)) ↔ false
equal(0, 0) ↔ true
gt(s(u), 0) ↔ true
equal(s(x), 0) ↔ false
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ Narrowing
↳ NonInfProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
COND1(false, x, y) → COND2(gt(x, y), x, y)
The TRS R consists of the following rules:
gt(0, v) → false
gt(s(u), 0) → true
gt(s(u), s(v)) → gt(u, v)
equal(0, 0) → true
equal(s(x), 0) → false
equal(0, s(y)) → false
equal(s(x), s(y)) → equal(x, y)
The set Q consists of the following terms:
equal(s(x0), 0)
equal(0, 0)
gt(0, x0)
gt(s(x0), s(x1))
equal(s(x0), s(x1))
equal(0, s(x0))
gt(s(x0), 0)
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 1 less node.