Certification Problem
Input (TPDB TRS_Standard/Rubio_04/enno)
The rewrite relation of the following TRS is considered.
lt(0,s(X)) |
→ |
true |
(1) |
lt(s(X),0) |
→ |
false |
(2) |
lt(s(X),s(Y)) |
→ |
lt(X,Y) |
(3) |
append(nil,Y) |
→ |
Y |
(4) |
append(add(N,X),Y) |
→ |
add(N,append(X,Y)) |
(5) |
split(N,nil) |
→ |
pair(nil,nil) |
(6) |
split(N,add(M,Y)) |
→ |
f_1(split(N,Y),N,M,Y) |
(7) |
f_1(pair(X,Z),N,M,Y) |
→ |
f_2(lt(N,M),N,M,Y,X,Z) |
(8) |
f_2(true,N,M,Y,X,Z) |
→ |
pair(X,add(M,Z)) |
(9) |
f_2(false,N,M,Y,X,Z) |
→ |
pair(add(M,X),Z) |
(10) |
qsort(nil) |
→ |
nil |
(11) |
qsort(add(N,X)) |
→ |
f_3(split(N,X),N,X) |
(12) |
f_3(pair(Y,Z),N,X) |
→ |
append(qsort(Y),add(X,qsort(Z))) |
(13) |
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.
f_3#(pair(Y,Z),N,X) |
→ |
qsort#(Y) |
(14) |
split#(N,add(M,Y)) |
→ |
f_1#(split(N,Y),N,M,Y) |
(15) |
lt#(s(X),s(Y)) |
→ |
lt#(X,Y) |
(16) |
f_1#(pair(X,Z),N,M,Y) |
→ |
lt#(N,M) |
(17) |
split#(N,add(M,Y)) |
→ |
split#(N,Y) |
(18) |
f_1#(pair(X,Z),N,M,Y) |
→ |
f_2#(lt(N,M),N,M,Y,X,Z) |
(19) |
qsort#(add(N,X)) |
→ |
split#(N,X) |
(20) |
f_3#(pair(Y,Z),N,X) |
→ |
qsort#(Z) |
(21) |
f_3#(pair(Y,Z),N,X) |
→ |
append#(qsort(Y),add(X,qsort(Z))) |
(22) |
append#(add(N,X),Y) |
→ |
append#(X,Y) |
(23) |
qsort#(add(N,X)) |
→ |
f_3#(split(N,X),N,X) |
(24) |
1.1 Dependency Graph Processor
The dependency pairs are split into 4
components.
-
The
1st
component contains the
pair
qsort#(add(N,X)) |
→ |
f_3#(split(N,X),N,X) |
(24) |
f_3#(pair(Y,Z),N,X) |
→ |
qsort#(Z) |
(21) |
f_3#(pair(Y,Z),N,X) |
→ |
qsort#(Y) |
(14) |
1.1.1 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[s(x1)] |
=
|
1 |
[append#(x1, x2)] |
=
|
0 |
[lt#(x1, x2)] |
=
|
0 |
[f_2(x1,...,x6)] |
=
|
x1 + x3 + x5 + x6 + 36461 |
[pair(x1, x2)] |
=
|
x1 + x2 + 1 |
[false] |
=
|
1 |
[f_2#(x1,...,x6)] |
=
|
0 |
[qsort(x1)] |
=
|
0 |
[split#(x1, x2)] |
=
|
0 |
[true] |
=
|
1 |
[qsort#(x1)] |
=
|
x1 + 0 |
[append(x1, x2)] |
=
|
0 |
[f_1(x1,...,x4)] |
=
|
x1 + x3 + 36461 |
[0] |
=
|
1 |
[nil] |
=
|
36459 |
[split(x1, x2)] |
=
|
x1 + x2 + 36460 |
[f_3#(x1, x2, x3)] |
=
|
x1 + 0 |
[f_1#(x1,...,x4)] |
=
|
0 |
[add(x1, x2)] |
=
|
x1 + x2 + 36461 |
[f_3(x1, x2, x3)] |
=
|
0 |
[lt(x1, x2)] |
=
|
1 |
together with the usable
rules
f_1(pair(X,Z),N,M,Y) |
→ |
f_2(lt(N,M),N,M,Y,X,Z) |
(8) |
lt(0,s(X)) |
→ |
true |
(1) |
lt(s(X),s(Y)) |
→ |
lt(X,Y) |
(3) |
f_2(false,N,M,Y,X,Z) |
→ |
pair(add(M,X),Z) |
(10) |
split(N,add(M,Y)) |
→ |
f_1(split(N,Y),N,M,Y) |
(7) |
f_2(true,N,M,Y,X,Z) |
→ |
pair(X,add(M,Z)) |
(9) |
split(N,nil) |
→ |
pair(nil,nil) |
(6) |
lt(s(X),0) |
→ |
false |
(2) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pairs
qsort#(add(N,X)) |
→ |
f_3#(split(N,X),N,X) |
(24) |
f_3#(pair(Y,Z),N,X) |
→ |
qsort#(Z) |
(21) |
f_3#(pair(Y,Z),N,X) |
→ |
qsort#(Y) |
(14) |
could be deleted.
1.1.1.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
2nd
component contains the
pair
append#(add(N,X),Y) |
→ |
append#(X,Y) |
(23) |
1.1.2 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[s(x1)] |
=
|
1 |
[append#(x1, x2)] |
=
|
x1 + 0 |
[lt#(x1, x2)] |
=
|
0 |
[f_2(x1,...,x6)] |
=
|
x1 + x3 + x5 + x6 + 1 |
[pair(x1, x2)] |
=
|
x1 + x2 + 1 |
[false] |
=
|
1 |
[f_2#(x1,...,x6)] |
=
|
0 |
[qsort(x1)] |
=
|
0 |
[split#(x1, x2)] |
=
|
0 |
[true] |
=
|
1 |
[qsort#(x1)] |
=
|
0 |
[append(x1, x2)] |
=
|
0 |
[f_1(x1,...,x4)] |
=
|
x1 + x3 + 1 |
[0] |
=
|
1 |
[nil] |
=
|
1 |
[split(x1, x2)] |
=
|
x1 + x2 + 36460 |
[f_3#(x1, x2, x3)] |
=
|
x1 + 0 |
[f_1#(x1,...,x4)] |
=
|
0 |
[add(x1, x2)] |
=
|
x1 + x2 + 1 |
[f_3(x1, x2, x3)] |
=
|
0 |
[lt(x1, x2)] |
=
|
1 |
together with the usable
rules
f_1(pair(X,Z),N,M,Y) |
→ |
f_2(lt(N,M),N,M,Y,X,Z) |
(8) |
lt(0,s(X)) |
→ |
true |
(1) |
lt(s(X),s(Y)) |
→ |
lt(X,Y) |
(3) |
f_2(false,N,M,Y,X,Z) |
→ |
pair(add(M,X),Z) |
(10) |
split(N,add(M,Y)) |
→ |
f_1(split(N,Y),N,M,Y) |
(7) |
f_2(true,N,M,Y,X,Z) |
→ |
pair(X,add(M,Z)) |
(9) |
split(N,nil) |
→ |
pair(nil,nil) |
(6) |
lt(s(X),0) |
→ |
false |
(2) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
append#(add(N,X),Y) |
→ |
append#(X,Y) |
(23) |
could be deleted.
1.1.2.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
3rd
component contains the
pair
split#(N,add(M,Y)) |
→ |
split#(N,Y) |
(18) |
1.1.3 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[s(x1)] |
=
|
1 |
[append#(x1, x2)] |
=
|
0 |
[lt#(x1, x2)] |
=
|
0 |
[f_2(x1,...,x6)] |
=
|
x1 + x3 + x5 + x6 + 1 |
[pair(x1, x2)] |
=
|
x1 + x2 + 1 |
[false] |
=
|
1 |
[f_2#(x1,...,x6)] |
=
|
0 |
[qsort(x1)] |
=
|
0 |
[split#(x1, x2)] |
=
|
x2 + 0 |
[true] |
=
|
1 |
[qsort#(x1)] |
=
|
0 |
[append(x1, x2)] |
=
|
0 |
[f_1(x1,...,x4)] |
=
|
x1 + x3 + 1 |
[0] |
=
|
1 |
[nil] |
=
|
1 |
[split(x1, x2)] |
=
|
x1 + x2 + 36460 |
[f_3#(x1, x2, x3)] |
=
|
x1 + 0 |
[f_1#(x1,...,x4)] |
=
|
0 |
[add(x1, x2)] |
=
|
x1 + x2 + 1 |
[f_3(x1, x2, x3)] |
=
|
0 |
[lt(x1, x2)] |
=
|
1 |
together with the usable
rules
f_1(pair(X,Z),N,M,Y) |
→ |
f_2(lt(N,M),N,M,Y,X,Z) |
(8) |
lt(0,s(X)) |
→ |
true |
(1) |
lt(s(X),s(Y)) |
→ |
lt(X,Y) |
(3) |
f_2(false,N,M,Y,X,Z) |
→ |
pair(add(M,X),Z) |
(10) |
split(N,add(M,Y)) |
→ |
f_1(split(N,Y),N,M,Y) |
(7) |
f_2(true,N,M,Y,X,Z) |
→ |
pair(X,add(M,Z)) |
(9) |
split(N,nil) |
→ |
pair(nil,nil) |
(6) |
lt(s(X),0) |
→ |
false |
(2) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
split#(N,add(M,Y)) |
→ |
split#(N,Y) |
(18) |
could be deleted.
1.1.3.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
4th
component contains the
pair
lt#(s(X),s(Y)) |
→ |
lt#(X,Y) |
(16) |
1.1.4 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[s(x1)] |
=
|
x1 + 1 |
[append#(x1, x2)] |
=
|
0 |
[lt#(x1, x2)] |
=
|
x1 + x2 + 0 |
[f_2(x1,...,x6)] |
=
|
x1 + x3 + x5 + x6 + 49735 |
[pair(x1, x2)] |
=
|
x1 + x2 + 41990 |
[false] |
=
|
1 |
[f_2#(x1,...,x6)] |
=
|
0 |
[qsort(x1)] |
=
|
0 |
[split#(x1, x2)] |
=
|
0 |
[true] |
=
|
1 |
[qsort#(x1)] |
=
|
0 |
[append(x1, x2)] |
=
|
0 |
[f_1(x1,...,x4)] |
=
|
x1 + x3 + 7746 |
[0] |
=
|
1 |
[nil] |
=
|
1 |
[split(x1, x2)] |
=
|
x1 + x2 + 41991 |
[f_3#(x1, x2, x3)] |
=
|
x1 + 0 |
[f_1#(x1,...,x4)] |
=
|
0 |
[add(x1, x2)] |
=
|
x1 + x2 + 7746 |
[f_3(x1, x2, x3)] |
=
|
0 |
[lt(x1, x2)] |
=
|
1 |
together with the usable
rules
f_1(pair(X,Z),N,M,Y) |
→ |
f_2(lt(N,M),N,M,Y,X,Z) |
(8) |
lt(0,s(X)) |
→ |
true |
(1) |
lt(s(X),s(Y)) |
→ |
lt(X,Y) |
(3) |
f_2(false,N,M,Y,X,Z) |
→ |
pair(add(M,X),Z) |
(10) |
split(N,add(M,Y)) |
→ |
f_1(split(N,Y),N,M,Y) |
(7) |
f_2(true,N,M,Y,X,Z) |
→ |
pair(X,add(M,Z)) |
(9) |
split(N,nil) |
→ |
pair(nil,nil) |
(6) |
lt(s(X),0) |
→ |
false |
(2) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
lt#(s(X),s(Y)) |
→ |
lt#(X,Y) |
(16) |
could be deleted.
1.1.4.1 Dependency Graph Processor
The dependency pairs are split into 0
components.