The rewrite relation of the following TRS is considered.
The dependency pairs are split into 3
components.
-
The
1st
component contains the
pair
cond#(true,x,y) |
→ |
minus#(x,s(y)) |
(14) |
minus#(x,y) |
→ |
cond#(equal(min(x,y),y),x,y) |
(11) |
1.1.1 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
min(0,v) |
→ |
0 |
(4) |
min(u,0) |
→ |
0 |
(5) |
min(s(u),s(v)) |
→ |
s(min(u,v)) |
(6) |
equal(0,0) |
→ |
true |
(7) |
equal(s(x),0) |
→ |
false |
(8) |
equal(0,s(y)) |
→ |
false |
(9) |
equal(s(x),s(y)) |
→ |
equal(x,y) |
(10) |
1.1.1.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
min(0,x0) |
min(x0,0) |
min(s(x0),s(x1)) |
equal(0,0) |
equal(s(x0),0) |
equal(0,s(x0)) |
equal(s(x0),s(x1)) |
1.1.1.1.1 Reduction Pair Processor
We apply the generic reduction pair processor using the
linear polynomial interpretation over the naturals
[c] |
= |
-1 |
[minus#(x1, x2)] |
= |
1 · x1 + -1 · x2
|
[cond#(x1, x2, x3)] |
= |
1 · x1 + 1 · x2 + -1 · x3 + -1 |
[true] |
= |
1 |
[s(x1)] |
= |
1 · x1 + 1 |
[equal(x1, x2)] |
= |
1 |
[min(x1, x2)] |
= |
0 |
[0] |
= |
0 |
[false] |
= |
0 |
The pair(s)
cond#(true,x,y) |
→ |
minus#(x,s(y)) |
(14) |
are strictly oriented and the pair(s)
cond#(true,x,y) |
→ |
minus#(x,s(y)) |
(14) |
are bounded w.r.t. the constant c.
The following constraints are generated for the pairs.
-
cond#(true,0,0)≥c
-
cond#(true,x20,0)≥c
-
cond#(true,s(0),s(0))≥c
-
cond#(true,s(x38),s(0))≥c
- (cond#(true,s(x44),s(x33))≥c⟹cond#(true,s(s(x44)),s(s(x33)))≥c)
-
cond#(true,0,0) > minus#(0,s(0))
-
cond#(true,x20,0) > minus#(x20,s(0))
-
cond#(true,s(0),s(0)) > minus#(s(0),s(s(0)))
-
cond#(true,s(x38),s(0)) > minus#(s(x38),s(s(0)))
- (cond#(true,s(x44),s(x33)) > minus#(s(x44),s(s(x33)))⟹cond#(true,s(s(x44)),s(s(x33))) > minus#(s(s(x44)),s(s(s(x33)))))
-
minus#(x6,s(x7))≥cond#(equal(min(x6,s(x7)),s(x7)),x6,s(x7))
The details are shown below:
-
For the chain
we build the initial constraint
(cond#(equal(min(x2,x3),x3),x2,x3)→*cond#(true,x4,x5)⟹cond#(true,x4,x5)≥c)
which is simplified as follows.
-
Applying Rule "Same Constructor" results in
(equal(min(x2,x3),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
(equal(min(x2,x3),x3)→*true⟹x3→*x5⟹cond#(true,x2,x5)≥c)
-
Applying Rule "Variable in Equation" allows to substitute
x5 by x3 which results in
(equal(min(x2,x3),x3)→*true⟹cond#(true,x2,x3)≥c)
-
Applying Rule "Introduce fresh variable" results in
(min(x2,x3)→*x12⟹equal(x12,x3)→*true⟹cond#(true,x2,x3)≥c)
-
Applying Rule "Induction" on equal(x12,x3)→*true results in the following 4 new constraints.
- (true→*true⟹min(x2,0)→*0⟹cond#(true,x2,0)≥c)
-
Applying Rule "Same Constructor" results in
(min(x2,0)→*0⟹cond#(true,x2,0)≥c)
-
Applying Rule "Introduce fresh variable" results in
(0→*x18⟹min(x2,x18)→*0⟹cond#(true,x2,0)≥c)
-
Applying Rule "Induction" on min(x2,x18)→*0 results in the following 3 new constraints.
- (0→*0⟹0→*x19⟹cond#(true,0,0)≥c)
- (0→*0⟹cond#(true,x20,0)≥c)
- (s(min(x22,x21))→*0⟹cond#(true,s(x22),0)≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (false→*true⟹cond#(true,x2,0)≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (false→*true⟹cond#(true,x2,s(x14))≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (equal(x16,x15)→*true⟹min(x2,s(x15))→*s(x16)⟹∀x17
.
(equal(x16,x15)→*true⟹min(x17,x15)→*x16⟹cond#(true,x17,x15)≥c)⟹cond#(true,x2,s(x15))≥c)
-
Applying Rule "Introduce fresh variable" results in
(equal(x16,x15)→*true⟹s(x15)→*x23⟹min(x2,x23)→*s(x16)⟹∀x17
.
(equal(x16,x15)→*true⟹min(x17,x15)→*x16⟹cond#(true,x17,x15)≥c)⟹cond#(true,x2,s(x15))≥c)
-
Applying Rule "Induction" on min(x2,x23)→*s(x16) results in the following 3 new constraints.
- (0→*s(x16)⟹cond#(true,0,s(x15))≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (0→*s(x16)⟹cond#(true,x25,s(x15))≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (s(min(x27,x26))→*s(x16)⟹equal(x16,x15)→*true⟹s(x15)→*s(x26)⟹∀x17
.
(equal(x16,x15)→*true⟹min(x17,x15)→*x16⟹cond#(true,x17,x15)≥c)⟹∀x28
.
∀x29
.
∀x30
.
(min(x27,x26)→*s(x28)⟹equal(x28,x29)→*true⟹s(x29)→*x26⟹∀x30
.
(equal(x28,x29)→*true⟹min(x30,x29)→*x28⟹cond#(true,x30,x29)≥c)⟹cond#(true,x27,s(x29))≥c)⟹cond#(true,s(x27),s(x15))≥c)
-
Applying Rule "Same Constructor" results in
(min(x27,x26)→*x16⟹equal(x16,x15)→*true⟹s(x15)→*s(x26)⟹∀x17
.
(equal(x16,x15)→*true⟹min(x17,x15)→*x16⟹cond#(true,x17,x15)≥c)⟹∀x28
.
∀x29
.
∀x30
.
(min(x27,x26)→*s(x28)⟹equal(x28,x29)→*true⟹s(x29)→*x26⟹∀x30
.
(equal(x28,x29)→*true⟹min(x30,x29)→*x28⟹cond#(true,x30,x29)≥c)⟹cond#(true,x27,s(x29))≥c)⟹cond#(true,s(x27),s(x15))≥c)
-
Applying Rule "Same Constructor" results in
(min(x27,x26)→*x16⟹equal(x16,x15)→*true⟹x15→*x26⟹∀x17
.
(equal(x16,x15)→*true⟹min(x17,x15)→*x16⟹cond#(true,x17,x15)≥c)⟹∀x28
.
∀x29
.
∀x30
.
(min(x27,x26)→*s(x28)⟹equal(x28,x29)→*true⟹s(x29)→*x26⟹∀x30
.
(equal(x28,x29)→*true⟹min(x30,x29)→*x28⟹cond#(true,x30,x29)≥c)⟹cond#(true,x27,s(x29))≥c)⟹cond#(true,s(x27),s(x15))≥c)
-
Applying Rule "Delete Conditions" results in
(min(x27,x26)→*x16⟹equal(x16,x15)→*true⟹x15→*x26⟹cond#(true,s(x27),s(x15))≥c)
-
Applying Rule "Induction" on equal(x16,x15)→*true results in the following 4 new constraints.
- (true→*true⟹min(x27,x26)→*0⟹0→*x26⟹cond#(true,s(x27),s(0))≥c)
-
Applying Rule "Same Constructor" results in
(min(x27,x26)→*0⟹0→*x26⟹cond#(true,s(x27),s(0))≥c)
-
Applying Rule "Induction" on min(x27,x26)→*0 results in the following 3 new constraints.
- (0→*0⟹0→*x37⟹cond#(true,s(0),s(0))≥c)
- (0→*0⟹cond#(true,s(x38),s(0))≥c)
- (s(min(x40,x39))→*0⟹cond#(true,s(s(x40)),s(0))≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (false→*true⟹cond#(true,s(x27),s(0))≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (false→*true⟹cond#(true,s(x27),s(s(x32)))≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (equal(x34,x33)→*true⟹min(x27,x26)→*s(x34)⟹s(x33)→*x26⟹∀x35
.
∀x36
.
(equal(x34,x33)→*true⟹min(x35,x36)→*x34⟹x33→*x36⟹cond#(true,s(x35),s(x33))≥c)⟹cond#(true,s(x27),s(s(x33)))≥c)
-
Applying Rule "Induction" on min(x27,x26)→*s(x34) results in the following 3 new constraints.
- (0→*s(x34)⟹cond#(true,s(0),s(s(x33)))≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (0→*s(x34)⟹cond#(true,s(x42),s(s(x33)))≥c)
- Applying Rule "Different Constructors" allows to drop this constraint.
- (s(min(x44,x43))→*s(x34)⟹equal(x34,x33)→*true⟹s(x33)→*s(x43)⟹∀x35
.
∀x36
.
(equal(x34,x33)→*true⟹min(x35,x36)→*x34⟹x33→*x36⟹cond#(true,s(x35),s(x33))≥c)⟹∀x45
.
∀x46
.
∀x47
.
∀x48
.
(min(x44,x43)→*s(x45)⟹equal(x45,x46)→*true⟹s(x46)→*x43⟹∀x47
.
∀x48
.
(equal(x45,x46)→*true⟹min(x47,x48)→*x45⟹x46→*x48⟹cond#(true,s(x47),s(x46))≥c)⟹cond#(true,s(x44),s(s(x46)))≥c)⟹cond#(true,s(s(x44)),s(s(x33)))≥c)
-
For the chain
we build the initial constraint
(cond#(equal(min(x2,x3),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
(equal(min(x2,x3),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
(equal(min(x2,x3),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
(equal(min(x2,x3),x3)→*true⟹cond#(true,x2,x3) > minus#(x2,s(x3)))
-
Applying Rule "Introduce fresh variable" results in
(min(x2,x3)→*x12⟹equal(x12,x3)→*true⟹cond#(true,x2,x3) > minus#(x2,s(x3)))
-
Applying Rule "Induction" on equal(x12,x3)→*true results in the following 4 new constraints.
- (true→*true⟹min(x2,0)→*0⟹cond#(true,x2,0) > minus#(x2,s(0)))
-
Applying Rule "Same Constructor" results in
(min(x2,0)→*0⟹cond#(true,x2,0) > minus#(x2,s(0)))
-
Applying Rule "Introduce fresh variable" results in
(0→*x18⟹min(x2,x18)→*0⟹cond#(true,x2,0) > minus#(x2,s(0)))
-
Applying Rule "Induction" on min(x2,x18)→*0 results in the following 3 new constraints.
- (0→*0⟹0→*x19⟹cond#(true,0,0) > minus#(0,s(0)))
- (0→*0⟹cond#(true,x20,0) > minus#(x20,s(0)))
- (s(min(x22,x21))→*0⟹cond#(true,s(x22),0) > minus#(s(x22),s(0)))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (false→*true⟹cond#(true,x2,0) > minus#(x2,s(0)))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (false→*true⟹cond#(true,x2,s(x14)) > minus#(x2,s(s(x14))))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (equal(x16,x15)→*true⟹min(x2,s(x15))→*s(x16)⟹∀x17
.
(equal(x16,x15)→*true⟹min(x17,x15)→*x16⟹cond#(true,x17,x15) > minus#(x17,s(x15)))⟹cond#(true,x2,s(x15)) > minus#(x2,s(s(x15))))
-
Applying Rule "Introduce fresh variable" results in
(equal(x16,x15)→*true⟹s(x15)→*x23⟹min(x2,x23)→*s(x16)⟹∀x17
.
(equal(x16,x15)→*true⟹min(x17,x15)→*x16⟹cond#(true,x17,x15) > minus#(x17,s(x15)))⟹cond#(true,x2,s(x15)) > minus#(x2,s(s(x15))))
-
Applying Rule "Induction" on min(x2,x23)→*s(x16) results in the following 3 new constraints.
- (0→*s(x16)⟹cond#(true,0,s(x15)) > minus#(0,s(s(x15))))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (0→*s(x16)⟹cond#(true,x25,s(x15)) > minus#(x25,s(s(x15))))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (s(min(x27,x26))→*s(x16)⟹equal(x16,x15)→*true⟹s(x15)→*s(x26)⟹∀x17
.
(equal(x16,x15)→*true⟹min(x17,x15)→*x16⟹cond#(true,x17,x15) > minus#(x17,s(x15)))⟹∀x28
.
∀x29
.
∀x30
.
(min(x27,x26)→*s(x28)⟹equal(x28,x29)→*true⟹s(x29)→*x26⟹∀x30
.
(equal(x28,x29)→*true⟹min(x30,x29)→*x28⟹cond#(true,x30,x29) > minus#(x30,s(x29)))⟹cond#(true,x27,s(x29)) > minus#(x27,s(s(x29))))⟹cond#(true,s(x27),s(x15)) > minus#(s(x27),s(s(x15))))
-
Applying Rule "Same Constructor" results in
(min(x27,x26)→*x16⟹equal(x16,x15)→*true⟹s(x15)→*s(x26)⟹∀x17
.
(equal(x16,x15)→*true⟹min(x17,x15)→*x16⟹cond#(true,x17,x15) > minus#(x17,s(x15)))⟹∀x28
.
∀x29
.
∀x30
.
(min(x27,x26)→*s(x28)⟹equal(x28,x29)→*true⟹s(x29)→*x26⟹∀x30
.
(equal(x28,x29)→*true⟹min(x30,x29)→*x28⟹cond#(true,x30,x29) > minus#(x30,s(x29)))⟹cond#(true,x27,s(x29)) > minus#(x27,s(s(x29))))⟹cond#(true,s(x27),s(x15)) > minus#(s(x27),s(s(x15))))
-
Applying Rule "Same Constructor" results in
(min(x27,x26)→*x16⟹equal(x16,x15)→*true⟹x15→*x26⟹∀x17
.
(equal(x16,x15)→*true⟹min(x17,x15)→*x16⟹cond#(true,x17,x15) > minus#(x17,s(x15)))⟹∀x28
.
∀x29
.
∀x30
.
(min(x27,x26)→*s(x28)⟹equal(x28,x29)→*true⟹s(x29)→*x26⟹∀x30
.
(equal(x28,x29)→*true⟹min(x30,x29)→*x28⟹cond#(true,x30,x29) > minus#(x30,s(x29)))⟹cond#(true,x27,s(x29)) > minus#(x27,s(s(x29))))⟹cond#(true,s(x27),s(x15)) > minus#(s(x27),s(s(x15))))
-
Applying Rule "Delete Conditions" results in
(min(x27,x26)→*x16⟹equal(x16,x15)→*true⟹x15→*x26⟹cond#(true,s(x27),s(x15)) > minus#(s(x27),s(s(x15))))
-
Applying Rule "Induction" on equal(x16,x15)→*true results in the following 4 new constraints.
- (true→*true⟹min(x27,x26)→*0⟹0→*x26⟹cond#(true,s(x27),s(0)) > minus#(s(x27),s(s(0))))
-
Applying Rule "Same Constructor" results in
(min(x27,x26)→*0⟹0→*x26⟹cond#(true,s(x27),s(0)) > minus#(s(x27),s(s(0))))
-
Applying Rule "Induction" on min(x27,x26)→*0 results in the following 3 new constraints.
- (0→*0⟹0→*x37⟹cond#(true,s(0),s(0)) > minus#(s(0),s(s(0))))
- (0→*0⟹cond#(true,s(x38),s(0)) > minus#(s(x38),s(s(0))))
- (s(min(x40,x39))→*0⟹cond#(true,s(s(x40)),s(0)) > minus#(s(s(x40)),s(s(0))))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (false→*true⟹cond#(true,s(x27),s(0)) > minus#(s(x27),s(s(0))))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (false→*true⟹cond#(true,s(x27),s(s(x32))) > minus#(s(x27),s(s(s(x32)))))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (equal(x34,x33)→*true⟹min(x27,x26)→*s(x34)⟹s(x33)→*x26⟹∀x35
.
∀x36
.
(equal(x34,x33)→*true⟹min(x35,x36)→*x34⟹x33→*x36⟹cond#(true,s(x35),s(x33)) > minus#(s(x35),s(s(x33))))⟹cond#(true,s(x27),s(s(x33))) > minus#(s(x27),s(s(s(x33)))))
-
Applying Rule "Induction" on min(x27,x26)→*s(x34) results in the following 3 new constraints.
- (0→*s(x34)⟹cond#(true,s(0),s(s(x33))) > minus#(s(0),s(s(s(x33)))))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (0→*s(x34)⟹cond#(true,s(x42),s(s(x33))) > minus#(s(x42),s(s(s(x33)))))
- Applying Rule "Different Constructors" allows to drop this constraint.
- (s(min(x44,x43))→*s(x34)⟹equal(x34,x33)→*true⟹s(x33)→*s(x43)⟹∀x35
.
∀x36
.
(equal(x34,x33)→*true⟹min(x35,x36)→*x34⟹x33→*x36⟹cond#(true,s(x35),s(x33)) > minus#(s(x35),s(s(x33))))⟹∀x45
.
∀x46
.
∀x47
.
∀x48
.
(min(x44,x43)→*s(x45)⟹equal(x45,x46)→*true⟹s(x46)→*x43⟹∀x47
.
∀x48
.
(equal(x45,x46)→*true⟹min(x47,x48)→*x45⟹x46→*x48⟹cond#(true,s(x47),s(x46)) > minus#(s(x47),s(s(x46))))⟹cond#(true,s(x44),s(s(x46))) > minus#(s(x44),s(s(s(x46)))))⟹cond#(true,s(s(x44)),s(s(x33))) > minus#(s(s(x44)),s(s(s(x33)))))
-
For the chain
we build the initial constraint
(minus#(x6,s(x7))→*minus#(x8,x9)⟹minus#(x8,x9)≥cond#(equal(min(x8,x9),x9),x8,x9))
which is simplified as follows.
We remove those pairs which are strictly decreasing and bounded.
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#(equal(min(x,y),y),x,y) |
(11) |
|
1 |
≥ |
2 |
2 |
≥ |
3 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
2nd
component contains the
pair
min#(s(u),s(v)) |
→ |
min#(u,v) |
(15) |
1.1.2 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
There are no rules.
1.1.2.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
There are no lhss.
1.1.2.1.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
min#(s(u),s(v)) |
→ |
min#(u,v) |
(15) |
|
1 |
> |
1 |
2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.
-
The
3rd
component contains the
pair
equal#(s(x),s(y)) |
→ |
equal#(x,y) |
(16) |
1.1.3 Usable Rules Processor
We restrict the rewrite rules to the following usable rules of the DP problem.
There are no rules.
1.1.3.1 Innermost Lhss Removal Processor
We restrict the innermost strategy to the following left hand sides.
There are no lhss.
1.1.3.1.1 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
equal#(s(x),s(y)) |
→ |
equal#(x,y) |
(16) |
|
1 |
> |
1 |
2 |
> |
2 |
As there is no critical graph in the transitive closure, there are no infinite chains.