Certification Problem
Input (TPDB TRS_Standard/SK90/2.29)
The rewrite relation of the following TRS is considered.
prime(0) |
→ |
false |
(1) |
prime(s(0)) |
→ |
false |
(2) |
prime(s(s(x))) |
→ |
prime1(s(s(x)),s(x)) |
(3) |
prime1(x,0) |
→ |
false |
(4) |
prime1(x,s(0)) |
→ |
true |
(5) |
prime1(x,s(s(y))) |
→ |
and(not(divp(s(s(y)),x)),prime1(x,s(y))) |
(6) |
divp(x,y) |
→ |
=(rem(x,y),0) |
(7) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by AProVE @ termCOMP 2023)
1 Rule Removal
Using the
prec(prime) |
= |
6 |
|
stat(prime) |
= |
mul
|
prec(0) |
= |
1 |
|
stat(0) |
= |
mul
|
prec(false) |
= |
5 |
|
stat(false) |
= |
mul
|
prec(s) |
= |
2 |
|
stat(s) |
= |
lex
|
prec(prime1) |
= |
5 |
|
stat(prime1) |
= |
lex
|
prec(true) |
= |
5 |
|
stat(true) |
= |
mul
|
prec(and) |
= |
3 |
|
stat(and) |
= |
lex
|
prec(divp) |
= |
4 |
|
stat(divp) |
= |
mul
|
prec(=) |
= |
0 |
|
stat(=) |
= |
lex
|
prec(rem) |
= |
0 |
|
stat(rem) |
= |
lex
|
π(prime) |
= |
[1] |
π(0) |
= |
[] |
π(false) |
= |
[] |
π(s) |
= |
[1] |
π(prime1) |
= |
[1,2] |
π(true) |
= |
[] |
π(and) |
= |
[1,2] |
π(not) |
= |
1 |
π(divp) |
= |
[1,2] |
π(=) |
= |
[1,2] |
π(rem) |
= |
[1,2] |
all of the following rules can be deleted.
prime(0) |
→ |
false |
(1) |
prime(s(0)) |
→ |
false |
(2) |
prime(s(s(x))) |
→ |
prime1(s(s(x)),s(x)) |
(3) |
prime1(x,0) |
→ |
false |
(4) |
prime1(x,s(0)) |
→ |
true |
(5) |
prime1(x,s(s(y))) |
→ |
and(not(divp(s(s(y)),x)),prime1(x,s(y))) |
(6) |
divp(x,y) |
→ |
=(rem(x,y),0) |
(7) |
1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.