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 AProVE @ 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) |
→ |
if#(nonZero(x),x,y) |
(13) |
rand#(x,y) |
→ |
nonZero#(x) |
(14) |
if#(true,x,y) |
→ |
rand#(p(x),id_inc(y)) |
(15) |
if#(true,x,y) |
→ |
p#(x) |
(16) |
if#(true,x,y) |
→ |
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)) |
(15) |
rand#(x,y) |
→ |
if#(nonZero(x),x,y) |
(13) |
1.1.1 Reduction Pair Processor with Usable Rules
Using the matrix interpretations of dimension 1 with strict dimension 1 over the arctic semiring over the integers
[if#(x1, x2, x3)] |
= |
+ · x1 + · x2 + · x3
|
[true] |
= |
|
[rand#(x1, x2)] |
= |
+ · x1 + · x2
|
[p(x1)] |
= |
+ · x1
|
[id_inc(x1)] |
= |
+ · x1
|
[nonZero(x1)] |
= |
+ · x1
|
[s(x1)] |
= |
+ · x1
|
[0] |
= |
|
[false] |
= |
|
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)) |
(15) |
could be deleted.
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.
rand#(x,y) |
→ |
if#(nonZero(x),x,y) |
(13) |
|
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
p#(s(s(x))) |
→ |
p#(s(x)) |
(11) |
1.1.2 Monotonic Reduction Pair Processor with Usable Rules
Using the linear polynomial interpretation over the naturals
[s(x1)] |
= |
1 · x1
|
[p#(x1)] |
= |
1 · x1
|
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
rule
could be deleted.
1.1.2.1 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.