Proceedings of the 13 ESSLLI Student Session - Multiple Choices ...
Proceedings of the 13 ESSLLI Student Session - Multiple Choices ...
Proceedings of the 13 ESSLLI Student Session - Multiple Choices ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Proceedings</strong> <strong>of</strong> <strong>the</strong> <strong>13</strong> th <strong>ESSLLI</strong> <strong>Student</strong> <strong>Session</strong><br />
Example 5 Reconsider <strong>the</strong> rewrite system Rmult from Example 1. We suppose that <strong>the</strong><br />
second argument <strong>of</strong> addition (add) is safe (safe(add) = {2}) and that all arguments <strong>of</strong><br />
multiplication (mult) are normal (safe(mult) = ∅). Fur<strong>the</strong>rmore let <strong>the</strong> precedence ><br />
be defined as mult > add > s. Then Rmult is compatible with >pop∗. As a consequence<br />
<strong>of</strong> Theorem 4, <strong>the</strong> number <strong>of</strong> rewrite steps starting from mult(�n�, �m�) is polynomially<br />
bounded in n and m.<br />
In order to verify compatibility for this particular instance >pop∗ we need to show that<br />
all <strong>the</strong> rules in Rmult are strictly decreasing with respect to >pop∗, that is l >pop∗ r holds<br />
for l → r ∈ Rmult. To exemplify this, consider <strong>the</strong> rule add(s(x), y) → s(add(x, y)).<br />
We write 〈i〉 for <strong>the</strong> i-th case <strong>of</strong> Definition 3. From s(x) >pop∗ x by rule 〈2〉 we infer<br />
[s(x)](>pop∗)mul[x]. Fur<strong>the</strong>rmore [y](> = pop∗)mul[y] holds and thus by rule 〈4〉 we obtain<br />
add(s(x), y) >pop∗ add(x, y). Finally, from this and add > s we conclude by one application<br />
<strong>of</strong> rule 〈3〉 that add(s(x), y) >pop∗ s(add(x, y)) holds.<br />
2 A Propositional Encoding <strong>of</strong> POP ∗ with Finite Semantic Labeling<br />
In (Zantema, 1995) <strong>the</strong> transformation technique semantic labeling is introduced. From<br />
R a labeled TRS Rlab is obtained by labeling <strong>the</strong> function symbols in R with semantic<br />
information. Semantics are given to R by defining a model. A model is a F-algebra<br />
A, i.e. a carrier A equipped with operations fA : A n → A for every n-ary symbol<br />
f ∈ F, such that for every rule l → r ∈ R and any assignment α : V → A, <strong>the</strong> equality<br />
[α]A(l) = [α]A(r) holds. Here [α]A(t) denotes <strong>the</strong> interpretation <strong>of</strong> t with assignment α,<br />
inductively defined by [α]A(t) = α(t) if t ∈ V and [α]A(t) = fA([α]A(t1), . . . , [α]A(tn))<br />
if t = f(t1, . . . , tn). The system is <strong>the</strong>n labeled according to a labeling ℓ for A, i.e. a set<br />
<strong>of</strong> mappings ℓf : A n → A for every n-ary function symbol f ∈ F. 1<br />
For every assignment α, <strong>the</strong> mapping labα(t) is defined by labα(t) = t if t ∈ V and<br />
labα(f(t1, . . . , tn)) = fa(labα(t1), . . . , labα(tn)) where a = ℓf([α]A(t1), . . . , [α]A(tn)).<br />
The labeled TRS Rlab is obtained by labeling all rules for all assignments α, that is<br />
Rlab = {labα(l) → labα(r) | l → r ∈ R and assignment α}.<br />
The main <strong>the</strong>orem from (Zantema, 1995) states that Rlab is terminating if and only if R<br />
is terminating. In <strong>the</strong> following, we restrict to algebras B with carrier B = {true, false},<br />
however <strong>the</strong> approach is extensible to arbitrary finite carriers.<br />
To encode a Boolean function b : B n → B, we make use <strong>of</strong> unique propositional atoms<br />
bw for every sequence <strong>of</strong> arguments w = w1, . . . , wn ∈ B n . The atom bw will denote<br />
<strong>the</strong> result <strong>of</strong> applying w1, . . . , wn to b. Let a1, . . . , an be propositional formulas. To<br />
impose restrictions on <strong>the</strong> encoded function b, we introduce <strong>the</strong> formula �b�(a1, . . . , an)<br />
such that for a satisfying assignment ν <strong>the</strong> equality ν(�b�(a1, . . . , an)) = bν(a1),...,ν(an)<br />
holds. For instance with �b�(a1, a2) ↔ r we assert that <strong>the</strong> encoded function b satisfies<br />
b(ν(a1), ν(a2)) = ν(r).<br />
For every assignment α : V → A and term t appearing in R we introduce <strong>the</strong> atoms<br />
intα,t and labα,t for t �∈ V. The meaning <strong>of</strong> intα,t will be <strong>the</strong> result <strong>of</strong> [α]B(t), labα,t<br />
will denote <strong>the</strong> label <strong>of</strong> <strong>the</strong> root symbol <strong>of</strong> t under α. In order to ensure this for t =<br />
1 The definition from (Zantema, 1995) allows <strong>the</strong> labeling <strong>of</strong> a subset <strong>of</strong> F and leave o<strong>the</strong>r symbols<br />
unchanged. In our context, this has no consequence and simplifies <strong>the</strong> translation.<br />
10