Certification Problem
Input (TPDB TRS_Standard/Rubio_04/gcd)
The rewrite relation of the following TRS is considered.
minus(X,s(Y)) |
→ |
pred(minus(X,Y)) |
(1) |
minus(X,0) |
→ |
X |
(2) |
pred(s(X)) |
→ |
X |
(3) |
le(s(X),s(Y)) |
→ |
le(X,Y) |
(4) |
le(s(X),0) |
→ |
false |
(5) |
le(0,Y) |
→ |
true |
(6) |
gcd(0,Y) |
→ |
0 |
(7) |
gcd(s(X),0) |
→ |
s(X) |
(8) |
gcd(s(X),s(Y)) |
→ |
if(le(Y,X),s(X),s(Y)) |
(9) |
if(true,s(X),s(Y)) |
→ |
gcd(minus(X,Y),s(Y)) |
(10) |
if(false,s(X),s(Y)) |
→ |
gcd(minus(Y,X),s(X)) |
(11) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by NaTT @ termCOMP 2023)
1 Dependency Pair Transformation
The following set of initial dependency pairs has been identified.
gcd#(s(X),s(Y)) |
→ |
le#(Y,X) |
(12) |
if#(true,s(X),s(Y)) |
→ |
minus#(X,Y) |
(13) |
le#(s(X),s(Y)) |
→ |
le#(X,Y) |
(14) |
minus#(X,s(Y)) |
→ |
pred#(minus(X,Y)) |
(15) |
if#(true,s(X),s(Y)) |
→ |
gcd#(minus(X,Y),s(Y)) |
(16) |
if#(false,s(X),s(Y)) |
→ |
gcd#(minus(Y,X),s(X)) |
(17) |
gcd#(s(X),s(Y)) |
→ |
if#(le(Y,X),s(X),s(Y)) |
(18) |
minus#(X,s(Y)) |
→ |
minus#(X,Y) |
(19) |
if#(false,s(X),s(Y)) |
→ |
minus#(Y,X) |
(20) |
1.1 Dependency Graph Processor
The dependency pairs are split into 3
components.
-
The
1st
component contains the
pair
gcd#(s(X),s(Y)) |
→ |
if#(le(Y,X),s(X),s(Y)) |
(18) |
if#(false,s(X),s(Y)) |
→ |
gcd#(minus(Y,X),s(X)) |
(17) |
if#(true,s(X),s(Y)) |
→ |
gcd#(minus(X,Y),s(Y)) |
(16) |
1.1.1 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[le(x1, x2)] |
=
|
1 |
[s(x1)] |
=
|
x1 + 3 |
[le#(x1, x2)] |
=
|
0 |
[minus(x1, x2)] |
=
|
x1 + 1 |
[gcd(x1, x2)] |
=
|
0 |
[false] |
=
|
2 |
[true] |
=
|
2 |
[pred(x1)] |
=
|
x1 + 0 |
[0] |
=
|
2 |
[if(x1, x2, x3)] |
=
|
0 |
[minus#(x1, x2)] |
=
|
0 |
[pred#(x1)] |
=
|
0 |
[if#(x1, x2, x3)] |
=
|
x2 + x3 + 0 |
[gcd#(x1, x2)] |
=
|
x1 + x2 + 1 |
together with the usable
rules
minus(X,s(Y)) |
→ |
pred(minus(X,Y)) |
(1) |
pred(s(X)) |
→ |
X |
(3) |
minus(X,0) |
→ |
X |
(2) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pairs
gcd#(s(X),s(Y)) |
→ |
if#(le(Y,X),s(X),s(Y)) |
(18) |
if#(false,s(X),s(Y)) |
→ |
gcd#(minus(Y,X),s(X)) |
(17) |
if#(true,s(X),s(Y)) |
→ |
gcd#(minus(X,Y),s(Y)) |
(16) |
could be deleted.
1.1.1.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
2nd
component contains the
pair
minus#(X,s(Y)) |
→ |
minus#(X,Y) |
(19) |
1.1.2 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[le(x1, x2)] |
=
|
1 |
[s(x1)] |
=
|
x1 + 3 |
[le#(x1, x2)] |
=
|
0 |
[minus(x1, x2)] |
=
|
x1 + 1 |
[gcd(x1, x2)] |
=
|
0 |
[false] |
=
|
2 |
[true] |
=
|
2 |
[pred(x1)] |
=
|
x1 + 0 |
[0] |
=
|
1 |
[if(x1, x2, x3)] |
=
|
0 |
[minus#(x1, x2)] |
=
|
x2 + 0 |
[pred#(x1)] |
=
|
0 |
[if#(x1, x2, x3)] |
=
|
0 |
[gcd#(x1, x2)] |
=
|
x1 + 1 |
together with the usable
rules
minus(X,s(Y)) |
→ |
pred(minus(X,Y)) |
(1) |
pred(s(X)) |
→ |
X |
(3) |
minus(X,0) |
→ |
X |
(2) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
minus#(X,s(Y)) |
→ |
minus#(X,Y) |
(19) |
could be deleted.
1.1.2.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
3rd
component contains the
pair
le#(s(X),s(Y)) |
→ |
le#(X,Y) |
(14) |
1.1.3 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[le(x1, x2)] |
=
|
1 |
[s(x1)] |
=
|
x1 + 3 |
[le#(x1, x2)] |
=
|
x1 + 0 |
[minus(x1, x2)] |
=
|
x1 + 1 |
[gcd(x1, x2)] |
=
|
0 |
[false] |
=
|
2 |
[true] |
=
|
2 |
[pred(x1)] |
=
|
x1 + 0 |
[0] |
=
|
1 |
[if(x1, x2, x3)] |
=
|
0 |
[minus#(x1, x2)] |
=
|
0 |
[pred#(x1)] |
=
|
0 |
[if#(x1, x2, x3)] |
=
|
0 |
[gcd#(x1, x2)] |
=
|
x1 + 1 |
together with the usable
rules
minus(X,s(Y)) |
→ |
pred(minus(X,Y)) |
(1) |
pred(s(X)) |
→ |
X |
(3) |
minus(X,0) |
→ |
X |
(2) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
le#(s(X),s(Y)) |
→ |
le#(X,Y) |
(14) |
could be deleted.
1.1.3.1 Dependency Graph Processor
The dependency pairs are split into 0
components.