YES
Termination Proof
Termination Proof
by ttt2 (version ttt2 1.15)
Input
The rewrite relation of the following TRS is considered.
tower(0(x0)) |
→ |
s(0(p(s(p(s(x0)))))) |
tower(s(x0)) |
→ |
p(s(p(s(twoto(p(s(p(s(tower(p(s(p(s(x0)))))))))))))) |
twoto(0(x0)) |
→ |
s(0(x0)) |
twoto(s(x0)) |
→ |
p(p(s(p(p(p(s(s(p(s(s(p(s(s(p(s(twice(p(s(p(s(p(p(p(s(s(s(twoto(p(s(p(s(x0)))))))))))))))))))))))))))))))) |
twice(0(x0)) |
→ |
0(x0) |
twice(s(x0)) |
→ |
p(p(p(s(s(s(s(s(twice(p(p(p(s(s(s(x0))))))))))))))) |
p(p(s(x0))) |
→ |
p(x0) |
p(s(x0)) |
→ |
x0 |
p(0(x0)) |
→ |
0(s(s(s(s(s(s(s(s(x0))))))))) |
Proof
1 Rule Removal
Using the
linear polynomial interpretation over the arctic semiring over the integers
[twoto(x1)] |
= |
0 ·
x1 +
-∞
|
[tower(x1)] |
= |
1 ·
x1 +
-∞
|
[p(x1)] |
= |
0 ·
x1 +
-∞
|
[twice(x1)] |
= |
0 ·
x1 +
-∞
|
[0(x1)] |
= |
0 ·
x1 +
-∞
|
[s(x1)] |
= |
0 ·
x1 +
-∞
|
the
rules
tower(s(x0)) |
→ |
p(s(p(s(twoto(p(s(p(s(tower(p(s(p(s(x0)))))))))))))) |
twoto(0(x0)) |
→ |
s(0(x0)) |
twoto(s(x0)) |
→ |
p(p(s(p(p(p(s(s(p(s(s(p(s(s(p(s(twice(p(s(p(s(p(p(p(s(s(s(twoto(p(s(p(s(x0)))))))))))))))))))))))))))))))) |
twice(0(x0)) |
→ |
0(x0) |
twice(s(x0)) |
→ |
p(p(p(s(s(s(s(s(twice(p(p(p(s(s(s(x0))))))))))))))) |
p(p(s(x0))) |
→ |
p(x0) |
p(s(x0)) |
→ |
x0 |
p(0(x0)) |
→ |
0(s(s(s(s(s(s(s(s(x0))))))))) |
remain.
1.1 Rule Removal
Using the
linear polynomial interpretation over (2 x 2)-matrices with strict dimension 1
over the naturals
[twoto(x1)] |
= |
·
x1 +
|
[tower(x1)] |
= |
·
x1 +
|
[p(x1)] |
= |
·
x1 +
|
[twice(x1)] |
= |
·
x1 +
|
[0(x1)] |
= |
·
x1 +
|
[s(x1)] |
= |
·
x1 +
|
the
rules
tower(s(x0)) |
→ |
p(s(p(s(twoto(p(s(p(s(tower(p(s(p(s(x0)))))))))))))) |
twoto(s(x0)) |
→ |
p(p(s(p(p(p(s(s(p(s(s(p(s(s(p(s(twice(p(s(p(s(p(p(p(s(s(s(twoto(p(s(p(s(x0)))))))))))))))))))))))))))))))) |
twice(0(x0)) |
→ |
0(x0) |
twice(s(x0)) |
→ |
p(p(p(s(s(s(s(s(twice(p(p(p(s(s(s(x0))))))))))))))) |
p(p(s(x0))) |
→ |
p(x0) |
p(s(x0)) |
→ |
x0 |
p(0(x0)) |
→ |
0(s(s(s(s(s(s(s(s(x0))))))))) |
remain.
1.1.1 Bounds
The given TRS is
match-bounded by 1.
This is shown by the following automaton.
-
final states:
{60, 2, 59, 45, 44, 16, 1}
-
transitions:
33 |
→ |
104 |
33 |
→ |
89 |
23 |
→ |
25 |
25 |
→ |
27 |
89 |
→ |
41 |
81 |
→ |
22 |
97 |
→ |
50 |
18 |
→ |
90 |
18 |
→ |
22 |
18 |
→ |
81 |
41 |
→ |
72 |
41 |
→ |
43 |
3 |
→ |
96 |
3 |
→ |
75 |
9 |
→ |
11 |
37 |
→ |
66 |
37 |
→ |
39 |
34 |
→ |
36 |
55 |
→ |
82 |
55 |
→ |
57 |
99 |
→ |
45 |
31 |
→ |
33 |
1 |
→ |
11 |
1 |
→ |
9 |
1 |
→ |
7 |
60 |
→ |
59 |
44 |
→ |
51 |
73 |
→ |
16 |
91 |
→ |
27 |
91 |
→ |
25 |
91 |
→ |
23 |
36 |
→ |
88 |
36 |
→ |
40 |
36 |
→ |
67 |
54 |
→ |
98 |
54 |
→ |
83 |
75 |
→ |
49 |
105 |
→ |
73 |
67 |
→ |
40 |
53 |
→ |
99 |
2 |
→ |
4 |
2 |
→ |
97 |
2 |
→ |
59 |
4 |
→ |
6 |
28 |
→ |
30 |
45 |
→ |
51 |
16 |
→ |
25 |
16 |
→ |
91 |
16 |
→ |
17 |
14 |
→ |
1 |
12 |
→ |
14 |
7 |
→ |
9 |
30 |
→ |
73 |
30 |
→ |
105 |
46 |
→ |
74 |
46 |
→ |
48 |
83 |
→ |
58 |
17 |
→ |
23 |
17 |
→ |
91 |
19 |
→ |
80 |
19 |
→ |
21 |
twoto0(11) |
→ |
12 |
twoto0(6) |
→ |
17 |
tower0(6) |
→ |
7 |
s0(33) |
→ |
34 |
s0(23) |
→ |
24 |
s0(41) |
→ |
42 |
s0(14) |
→ |
15 |
s0(63) |
→ |
64 |
s0(30) |
→ |
31 |
s0(37) |
→ |
38 |
s0(19) |
→ |
20 |
s0(7) |
→ |
8 |
s0(51) |
→ |
52 |
s0(34) |
→ |
35 |
s0(55) |
→ |
56 |
s0(46) |
→ |
47 |
s0(36) |
→ |
37 |
s0(18) |
→ |
19 |
s0(28) |
→ |
29 |
s0(3) |
→ |
46 |
s0(47) |
→ |
61 |
s0(64) |
→ |
65 |
s0(9) |
→ |
10 |
s0(25) |
→ |
26 |
s0(54) |
→ |
55 |
s0(12) |
→ |
13 |
s0(61) |
→ |
62 |
s0(53) |
→ |
54 |
s0(31) |
→ |
32 |
s0(62) |
→ |
63 |
s0(17) |
→ |
18 |
s0(2) |
→ |
3 |
s0(4) |
→ |
5 |
s0(52) |
→ |
53 |
twice0(50) |
→ |
51 |
twice0(27) |
→ |
28 |
00(65) |
→ |
60 |
00(2) |
→ |
44 |
f60
|
→ |
2 |
p0(2) |
→ |
59 |
p0(56) |
→ |
57 |
p0(10) |
→ |
11 |
p0(49) |
→ |
50 |
p0(48) |
→ |
49 |
p0(24) |
→ |
25 |
p0(43) |
→ |
16 |
p0(8) |
→ |
9 |
p0(21) |
→ |
22 |
p0(26) |
→ |
27 |
p0(38) |
→ |
39 |
p0(3) |
→ |
4 |
p0(32) |
→ |
33 |
p0(29) |
→ |
30 |
p0(15) |
→ |
1 |
p0(35) |
→ |
36 |
p0(22) |
→ |
23 |
p0(42) |
→ |
43 |
p0(20) |
→ |
21 |
p0(39) |
→ |
40 |
p0(40) |
→ |
41 |
p0(57) |
→ |
58 |
p0(58) |
→ |
45 |
p0(5) |
→ |
6 |
p0(13) |
→ |
14 |
p0(47) |
→ |
48 |
p1(72) |
→ |
73 |
p1(82) |
→ |
83 |
p1(98) |
→ |
99 |
p1(80) |
→ |
81 |
p1(88) |
→ |
89 |
p1(74) |
→ |
75 |
p1(66) |
→ |
67 |
p1(96) |
→ |
97 |
p1(90) |
→ |
91 |
p1(104) |
→ |
105 |