The
1st
component contains the
pair
cond#(true,x,y) |
→ |
minus#(x,s(y)) |
(9) |
minus#(x,y) |
→ |
cond#(ge(x,s(y)),x,y) |
(7) |
1.1.1.1 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
ge(0,s(v)) |
→ |
false |
(5) |
ge(s(u),s(v)) |
→ |
ge(u,v) |
(6) |
ge(u,0) |
→ |
true |
(4) |
1.1.1.1.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
ge(x0,0) |
ge(0,s(x0)) |
ge(s(x0),s(x1)) |
1.1.1.1.1.1 Reduction Pair Processor
We apply the generic reduction pair processor using the
linear polynomial interpretation over the naturals
[c] |
= |
-2 |
[minus#(x1, x2)] |
= |
1 · x1 + -1 · x2 + -1 |
[cond#(x1, x2, x3)] |
= |
-1 · x1 + 1 · x2 + -1 · x3 + -1 |
[true] |
= |
0 |
[s(x1)] |
= |
1 · x1 + 1 |
[ge(x1, x2)] |
= |
0 |
[0] |
= |
1 |
[false] |
= |
0 |
The pair(s)
cond#(true,x,y) |
→ |
minus#(x,s(y)) |
(9) |
are strictly oriented and the pair(s)
cond#(true,x,y) |
→ |
minus#(x,s(y)) |
(9) |
are bounded w.r.t. the constant c.
The following constraints are generated for the pairs.
- (cond#(true,s(x20),x19)≥c⟹cond#(true,s(s(x20)),s(x19))≥c)
-
cond#(true,s(x21),0)≥c
- (cond#(true,s(x20),x19) > minus#(s(x20),s(x19))⟹cond#(true,s(s(x20)),s(x19)) > minus#(s(s(x20)),s(s(x19))))
-
cond#(true,s(x21),0) > minus#(s(x21),s(0))
-
minus#(x6,s(x7))≥cond#(ge(x6,s(s(x7))),x6,s(x7))
The details are shown below:
-
For the chain
we build the initial constraint
(cond#(ge(x2,s(x3)),x2,x3)→*cond#(true,x4,x5)⟹cond#(true,x4,x5)≥c)
which is simplified as follows.
-
Applying Rule "Same Constructor" results in
(ge(x2,s(x3))→*true⟹x2→*x4⟹x3→*x5⟹cond#(true,x4,x5)≥c)
-
Applying Rule "Variable in Equation" allows to substitute
x4 by x2 which results in
(ge(x2,s(x3))→*true⟹x3→*x5⟹cond#(true,x2,x5)≥c)
-
Applying Rule "Variable in Equation" allows to substitute
x5 by x3 which results in
(ge(x2,s(x3))→*true⟹cond#(true,x2,x3)≥c)
-
Applying Rule "Introduce fresh variable" results in
(s(x3)→*x12⟹ge(x2,x12)→*true⟹cond#(true,x2,x3)≥c)
-
Applying Rule "Induction" on ge(x2,x12)→*true results in the following 3 new constraints.
- (false→*true⟹cond#(true,0,x3)≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (ge(x15,x14)→*true⟹s(x3)→*s(x14)⟹∀x16
.
(ge(x15,x14)→*true⟹s(x16)→*x14⟹cond#(true,x15,x16)≥c)⟹cond#(true,s(x15),x3)≥c)
-
Applying Rule "Same Constructor" results in
(ge(x15,x14)→*true⟹x3→*x14⟹∀x16
.
(ge(x15,x14)→*true⟹s(x16)→*x14⟹cond#(true,x15,x16)≥c)⟹cond#(true,s(x15),x3)≥c)
-
Applying Rule "Variable in Equation" allows to substitute
x3 by x14 which results in
(ge(x15,x14)→*true⟹∀x16
.
(ge(x15,x14)→*true⟹s(x16)→*x14⟹cond#(true,x15,x16)≥c)⟹cond#(true,s(x15),x14)≥c)
-
Applying Rule "Delete Conditions" results in
(ge(x15,x14)→*true⟹cond#(true,s(x15),x14)≥c)
-
Applying Rule "Induction" on ge(x15,x14)→*true results in the following 3 new constraints.
- (false→*true⟹cond#(true,s(0),s(x18))≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (ge(x20,x19)→*true⟹(ge(x20,x19)→*true⟹cond#(true,s(x20),x19)≥c)⟹cond#(true,s(s(x20)),s(x19))≥c)
- (true→*true⟹cond#(true,s(x21),0)≥c)
- (true→*true⟹s(x3)→*0⟹cond#(true,x17,x3)≥c)
-
Applying Rule "Same Constructor" results in
(s(x3)→*0⟹cond#(true,x17,x3)≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
-
For the chain
we build the initial constraint
(cond#(ge(x2,s(x3)),x2,x3)→*cond#(true,x4,x5)⟹cond#(true,x4,x5) > minus#(x4,s(x5)))
which is simplified as follows.
-
Applying Rule "Same Constructor" results in
(ge(x2,s(x3))→*true⟹x2→*x4⟹x3→*x5⟹cond#(true,x4,x5) > minus#(x4,s(x5)))
-
Applying Rule "Variable in Equation" allows to substitute
x4 by x2 which results in
(ge(x2,s(x3))→*true⟹x3→*x5⟹cond#(true,x2,x5) > minus#(x2,s(x5)))
-
Applying Rule "Variable in Equation" allows to substitute
x5 by x3 which results in
(ge(x2,s(x3))→*true⟹cond#(true,x2,x3) > minus#(x2,s(x3)))
-
Applying Rule "Introduce fresh variable" results in
(s(x3)→*x12⟹ge(x2,x12)→*true⟹cond#(true,x2,x3) > minus#(x2,s(x3)))
-
Applying Rule "Induction" on ge(x2,x12)→*true results in the following 3 new constraints.
- (false→*true⟹cond#(true,0,x3) > minus#(0,s(x3)))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (ge(x15,x14)→*true⟹s(x3)→*s(x14)⟹∀x16
.
(ge(x15,x14)→*true⟹s(x16)→*x14⟹cond#(true,x15,x16) > minus#(x15,s(x16)))⟹cond#(true,s(x15),x3) > minus#(s(x15),s(x3)))
-
Applying Rule "Same Constructor" results in
(ge(x15,x14)→*true⟹x3→*x14⟹∀x16
.
(ge(x15,x14)→*true⟹s(x16)→*x14⟹cond#(true,x15,x16) > minus#(x15,s(x16)))⟹cond#(true,s(x15),x3) > minus#(s(x15),s(x3)))
-
Applying Rule "Variable in Equation" allows to substitute
x3 by x14 which results in
(ge(x15,x14)→*true⟹∀x16
.
(ge(x15,x14)→*true⟹s(x16)→*x14⟹cond#(true,x15,x16) > minus#(x15,s(x16)))⟹cond#(true,s(x15),x14) > minus#(s(x15),s(x14)))
-
Applying Rule "Delete Conditions" results in
(ge(x15,x14)→*true⟹cond#(true,s(x15),x14) > minus#(s(x15),s(x14)))
-
Applying Rule "Induction" on ge(x15,x14)→*true results in the following 3 new constraints.
- (false→*true⟹cond#(true,s(0),s(x18)) > minus#(s(0),s(s(x18))))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (ge(x20,x19)→*true⟹(ge(x20,x19)→*true⟹cond#(true,s(x20),x19) > minus#(s(x20),s(x19)))⟹cond#(true,s(s(x20)),s(x19)) > minus#(s(s(x20)),s(s(x19))))
- (true→*true⟹cond#(true,s(x21),0) > minus#(s(x21),s(0)))
- (true→*true⟹s(x3)→*0⟹cond#(true,x17,x3) > minus#(x17,s(x3)))
-
Applying Rule "Same Constructor" results in
(s(x3)→*0⟹cond#(true,x17,x3) > minus#(x17,s(x3)))
- Applying Rule "Different Constructors" allows to drop this constraint.
-
For the chain
we build the initial constraint
(minus#(x6,s(x7))→*minus#(x8,x9)⟹minus#(x8,x9)≥cond#(ge(x8,s(x9)),x8,x9))
which is simplified as follows.
We remove those pairs which are strictly decreasing and bounded.
1.1.1.1.1.1.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
minus#(x,y) |
→ |
cond#(ge(x,s(y)),x,y) |
(7) |
|
1 |
≥ |
2 |
2 |
≥ |
3 |
As there is no critical graph in the transitive closure, there are no infinite chains.