Certification Problem
Input (TPDB TRS_Standard/AProVE_08/thiemann40_modified)
The rewrite relation of the following TRS is considered.
nonZero(0) |
→ |
false |
(1) |
nonZero(s(x)) |
→ |
true |
(2) |
p(s(0)) |
→ |
0 |
(3) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(4) |
id_inc(x) |
→ |
x |
(5) |
id_inc(x) |
→ |
s(x) |
(6) |
random(x) |
→ |
rand(x,0) |
(7) |
rand(x,y) |
→ |
if(nonZero(x),x,y) |
(8) |
if(false,x,y) |
→ |
y |
(9) |
if(true,x,y) |
→ |
rand(p(x),id_inc(y)) |
(10) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by ttt2 @ termCOMP 2023)
1 Dependency Pair Transformation
The following set of initial dependency pairs has been identified.
p#(s(s(x))) |
→ |
p#(s(x)) |
(11) |
random#(x) |
→ |
rand#(x,0) |
(12) |
rand#(x,y) |
→ |
nonZero#(x) |
(13) |
rand#(x,y) |
→ |
if#(nonZero(x),x,y) |
(14) |
if#(true,x,y) |
→ |
id_inc#(y) |
(15) |
if#(true,x,y) |
→ |
p#(x) |
(16) |
if#(true,x,y) |
→ |
rand#(p(x),id_inc(y)) |
(17) |
1.1 Dependency Graph Processor
The dependency pairs are split into 2
components.
-
The
1st
component contains the
pair
if#(true,x,y) |
→ |
rand#(p(x),id_inc(y)) |
(17) |
rand#(x,y) |
→ |
if#(nonZero(x),x,y) |
(14) |
1.1.1 Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the arctic semiring over the integers
[true] |
= |
2 |
[if#(x1, x2, x3)] |
= |
1 · x1 + 1 · x2 +
-∞ · x3 + 0 |
[nonZero(x1)] |
= |
0 · x1 +
-∞ |
[s(x1)] |
= |
3 · x1 + 2 |
[p(x1)] |
= |
-1 · x1 + 1 |
[0] |
= |
4 |
[rand#(x1, x2)] |
= |
1 · x1 +
-∞ · x2 + 0 |
[id_inc(x1)] |
= |
0 · x1 + 4 |
[false] |
= |
4 |
together with the usable
rules
p(s(0)) |
→ |
0 |
(3) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(4) |
nonZero(0) |
→ |
false |
(1) |
nonZero(s(x)) |
→ |
true |
(2) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
if#(true,x,y) |
→ |
rand#(p(x),id_inc(y)) |
(17) |
could be deleted.
1.1.1.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
2nd
component contains the
pair
p#(s(s(x))) |
→ |
p#(s(x)) |
(11) |
1.1.2 Size-Change Termination
Using size-change termination in combination with
the subterm criterion
one obtains the following initial size-change graphs.
p#(s(s(x))) |
→ |
p#(s(x)) |
(11) |
|
1 |
> |
1 |
As there is no critical graph in the transitive closure, there are no infinite chains.