Certification Problem
Input (TPDB TRS_Standard/Applicative_05/Ex2_6_1Composition)
The rewrite relation of the following TRS is considered.
app(app(app(compose,f),g),x) |
→ |
app(f,app(g,x)) |
(1) |
Property / Task
Prove or disprove termination.Answer / Result
Yes.Proof (by AProVE @ termCOMP 2023)
1 Uncurrying
We uncurry the binary symbol
app
in combination with the following symbol map which also determines the applicative arities of these symbols.
compose |
is mapped to |
compose, |
compose1(x1), |
compose2(x1, x2), |
compose3(x1, x2, x3) |
There are no uncurry rules.
No rules have to be added for the eta-expansion.
Uncurrying the rules and adding the uncurrying rules yields the new set of rules
compose3(f,g,x) |
→ |
app(f,app(g,x)) |
(5) |
app(compose,y1) |
→ |
compose1(y1) |
(2) |
app(compose1(x0),y1) |
→ |
compose2(x0,y1) |
(3) |
app(compose2(x0,x1),y1) |
→ |
compose3(x0,x1,y1) |
(4) |
1.1 Rule Removal
Using the
Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(compose) |
= |
0 |
|
weight(compose) |
= |
1 |
|
|
|
prec(compose1) |
= |
1 |
|
weight(compose1) |
= |
1 |
|
|
|
prec(compose3) |
= |
4 |
|
weight(compose3) |
= |
0 |
|
|
|
prec(app) |
= |
3 |
|
weight(app) |
= |
0 |
|
|
|
prec(compose2) |
= |
2 |
|
weight(compose2) |
= |
1 |
|
|
|
all of the following rules can be deleted.
compose3(f,g,x) |
→ |
app(f,app(g,x)) |
(5) |
app(compose,y1) |
→ |
compose1(y1) |
(2) |
app(compose1(x0),y1) |
→ |
compose2(x0,y1) |
(3) |
app(compose2(x0,x1),y1) |
→ |
compose3(x0,x1,y1) |
(4) |
1.1.1 R is empty
There are no rules in the TRS. Hence, it is terminating.