Certification Problem
Input (TPDB TRS_Standard/AProVE_06/factorial1)
The rewrite relation of the following TRS is considered.
plus(0,x) |
→ |
x |
(1) |
plus(s(x),y) |
→ |
s(plus(p(s(x)),y)) |
(2) |
times(0,y) |
→ |
0 |
(3) |
times(s(x),y) |
→ |
plus(y,times(p(s(x)),y)) |
(4) |
p(s(0)) |
→ |
0 |
(5) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(6) |
fac(0,x) |
→ |
x |
(7) |
fac(s(x),y) |
→ |
fac(p(s(x)),times(s(x),y)) |
(8) |
factorial(x) |
→ |
fac(x,s(0)) |
(9) |
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.
plus#(s(x),y) |
→ |
p#(s(x)) |
(10) |
fac#(s(x),y) |
→ |
p#(s(x)) |
(11) |
times#(s(x),y) |
→ |
times#(p(s(x)),y) |
(12) |
fac#(s(x),y) |
→ |
times#(s(x),y) |
(13) |
times#(s(x),y) |
→ |
p#(s(x)) |
(14) |
fac#(s(x),y) |
→ |
fac#(p(s(x)),times(s(x),y)) |
(15) |
p#(s(s(x))) |
→ |
p#(s(x)) |
(16) |
plus#(s(x),y) |
→ |
plus#(p(s(x)),y) |
(17) |
times#(s(x),y) |
→ |
plus#(y,times(p(s(x)),y)) |
(18) |
factorial#(x) |
→ |
fac#(x,s(0)) |
(19) |
1.1 Dependency Graph Processor
The dependency pairs are split into 4
components.
-
The
1st
component contains the
pair
fac#(s(x),y) |
→ |
fac#(p(s(x)),times(s(x),y)) |
(15) |
1.1.1 Reduction Pair Processor with Usable Rules
Using the matrix interpretations of dimension 2 with strict dimension 1 over the naturals
[s(x1)] |
= |
· x1 +
|
[fac#(x1, x2)] |
= |
· x1 +
|
[plus#(x1, x2)] |
= |
|
[p#(x1)] |
= |
|
[p(x1)] |
= |
· x1 +
|
[times#(x1, x2)] |
= |
|
[0] |
= |
|
[times(x1, x2)] |
= |
· x1 + · x2 +
|
[fac(x1, x2)] |
= |
|
[plus(x1, x2)] |
= |
· x2 +
|
[factorial(x1)] |
= |
|
[factorial#(x1)] |
= |
|
together with the usable
rules
times(0,y) |
→ |
0 |
(3) |
p(s(0)) |
→ |
0 |
(5) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(6) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
fac#(s(x),y) |
→ |
fac#(p(s(x)),times(s(x),y)) |
(15) |
could be deleted.
1.1.1.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
2nd
component contains the
pair
times#(s(x),y) |
→ |
times#(p(s(x)),y) |
(12) |
1.1.2 Reduction Pair Processor with Usable Rules
Using the matrix interpretations of dimension 2 with strict dimension 1 over the naturals
[s(x1)] |
= |
· x1 +
|
[fac#(x1, x2)] |
= |
· x1 +
|
[plus#(x1, x2)] |
= |
|
[p#(x1)] |
= |
|
[p(x1)] |
= |
· x1 +
|
[times#(x1, x2)] |
= |
· x1 +
|
[0] |
= |
|
[times(x1, x2)] |
= |
· x1 + · x2 +
|
[fac(x1, x2)] |
= |
|
[plus(x1, x2)] |
= |
· x1 + · x2 +
|
[factorial(x1)] |
= |
|
[factorial#(x1)] |
= |
|
together with the usable
rules
times(0,y) |
→ |
0 |
(3) |
p(s(0)) |
→ |
0 |
(5) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(6) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
times#(s(x),y) |
→ |
times#(p(s(x)),y) |
(12) |
could be deleted.
1.1.2.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
3rd
component contains the
pair
plus#(s(x),y) |
→ |
plus#(p(s(x)),y) |
(17) |
1.1.3 Reduction Pair Processor with Usable Rules
Using the matrix interpretations of dimension 2 with strict dimension 1 over the naturals
[s(x1)] |
= |
· x1 +
|
[fac#(x1, x2)] |
= |
|
[plus#(x1, x2)] |
= |
· x1 +
|
[p#(x1)] |
= |
|
[p(x1)] |
= |
· x1 +
|
[times#(x1, x2)] |
= |
|
[0] |
= |
|
[times(x1, x2)] |
= |
· x1 + x2 +
|
[fac(x1, x2)] |
= |
|
[plus(x1, x2)] |
= |
· x1 + · x2 +
|
[factorial(x1)] |
= |
|
[factorial#(x1)] |
= |
|
together with the usable
rules
times(0,y) |
→ |
0 |
(3) |
p(s(0)) |
→ |
0 |
(5) |
p(s(s(x))) |
→ |
s(p(s(x))) |
(6) |
(w.r.t. the implicit argument filter of the reduction pair),
the
pair
plus#(s(x),y) |
→ |
plus#(p(s(x)),y) |
(17) |
could be deleted.
1.1.3.1 Dependency Graph Processor
The dependency pairs are split into 0
components.
-
The
4th
component contains the
pair
p#(s(s(x))) |
→ |
p#(s(x)) |
(16) |
1.1.4 Reduction Pair Processor with Usable Rules
Using the Max-polynomial interpretation
[s(x1)] |
=
|
x1 + 1 |
[fac#(x1, x2)] |
=
|
0 |
[plus#(x1, x2)] |
=
|
0 |
[p#(x1)] |
=
|
x1 + 0 |
[p(x1)] |
=
|
1 |
[times#(x1, x2)] |
=
|
0 |
[0] |
=
|
2 |
[times(x1, x2)] |
=
|
x2 + 1 |
[fac(x1, x2)] |
=
|
0 |
[plus(x1, x2)] |
=
|
x1 + x2 + 1 |
[factorial(x1)] |
=
|
0 |
[factorial#(x1)] |
=
|
0 |
having no usable rules (w.r.t. the implicit argument filter of the
reduction pair),
the
pair
p#(s(s(x))) |
→ |
p#(s(x)) |
(16) |
could be deleted.
1.1.4.1 Dependency Graph Processor
The dependency pairs are split into 0
components.