B Basic properties on nominal rewriting

```21
B
Basic properties on nominal rewriting
In this section we show basic properties on nominal rewriting. We use the following facts.
0
0
I Proposition B.1. π&middot;(π 0 &middot;t) = (π ◦ π 0 )&middot;t and (tπ )π = tπ ◦π .
I Proposition B.2 ([FG07]). π&middot;(tσ) = (π&middot;t)σ.
I
1.
2.
3.
4.
Proposition B.3 ([FG07]).
∇ ` a#t if and only if ∇ ` π&middot;a#π&middot;t.
∇ ` t ≈α s if and only if ∇ ` π&middot;t ≈α π&middot;s.
If ∇ ` a#t and ∇ ` t ≈α s then ∇ ` a#s.
∀a ∈ ds(π, π 0 ). ∇ ` a#t if and only if ∇ ` π&middot;t ≈α π 0 &middot;t.
I Proposition B.4 ([FG07]). For any freshness context ∇, the binary relation ∇ ` − ≈α −
is a congruence (i.e. an equivalence relation that is closed under any context C[ ]).
I Lemma B.5. π&middot;(tσ) = tπ (π&middot;σ).
Proof. By induction on t. Case t = a. Then π&middot;(aσ) = π&middot;a = π(a) = aπ = aπ (π&middot;σ). Case
t = τ &middot;X. Then π&middot;((τ &middot;X)σ) = (π◦τ )&middot;σ(X) = (π◦τ ◦π −1 ◦π)&middot;σ(X) = (π◦τ ◦π −1 )&middot;((π&middot;σ)(X)) =
(τ &middot;X)π (π&middot;σ). Case t = f s. From induction hypothesis, we have π&middot;((f s)σ) = f (π&middot;sσ) =
f (sπ (π&middot;σ)) = (f sπ )(π&middot;σ) = (f s)π (π&middot;σ). Case t = (t1 , . . . , tn ). From induction hypothesis,
we have π&middot;((t1 , . . . , tn )σ) = (π&middot;t1 σ, . . . , π&middot;tn σ) = (tπ1 (π&middot;σ), . . . , tπn (π&middot;σ)) = (tπ1 , . . . , tπn )(π&middot;σ) =
(t1 , . . . , tn )π (π&middot;σ). Case t = [a]s. From induction hypothesis, we have π&middot;(([a]s)σ) =
[π&middot;a]π&middot;sσ = [π&middot;a]sπ (π&middot;σ) = ([a]s)π (π&middot;σ).
J
I Lemma B.6. If ∆ ` ∇σ then ∆ ` ∇π (π&middot;σ).
Proof. Let a#X ∈ ∇. By Lemma B.3(1), we have ∆ ` a#Xσ ⇐⇒ ∆ ` π&middot;a#(π&middot;Xσ) ⇐⇒
∆ ` π&middot;a#X(π&middot;σ). Hence the claim follows.
J
I Lemma B.7. If ∆ ` s →hR,π,p,σi t then ∆ ` τ &middot;s →hR,τ ◦π,p,τ &middot;σi τ &middot;t.
Proof. Suppose R = ∇ ` l → r and s = C[s0 ]p . We have ∆ ` ∇π σ, s0 ≈α lπ σ and t = C[rπ σ]
by the definition of the rewrite relation.
First, for α-equivalence part, by ∆ ` s0 ≈α lπ σ and Proposition B.3(2), we have
∆ ` τ &middot;s0 ≈α τ &middot;(lπ σ). Now, by Lemma B.5, we have τ &middot;(lπ σ) = lτ ◦π (τ &middot;σ). Thus, we have
∆ ` τ &middot;s0 ≈α lτ ◦π (τ &middot;σ).
Next, for freshness constraints part, by ∆ ` ∇π σ and Lemma B.6, we have ∆ ` ∇τ ◦π (τ &middot;σ).
Combining these properties, we have ∆ ` (τ &middot;C)[τ &middot;s0 ]p →hR,τ ◦π,p,τ &middot;σi (τ &middot;C)[rτ ◦π (τ &middot;σ)]p .
Here, τ &middot;t = (τ &middot;C)[rτ ◦π (τ &middot;σ)] is followed from Lemma B.5. We also have τ &middot;s = (τ &middot;C)[τ &middot;s0 ]p .
Thus, we obtain ∆ ` τ &middot;s →hR,τ ◦π,p,τ &middot;σi τ &middot;t as required.
J
I Lemma B.8 ([FG07]). Let R be a uniform nominal rewrite rule. If ∆ ` a#s and
∆ ` s →R t then ∆ ` a#t.
I Lemma B.9 (Strong compatibility with ≈α ). Let R be a uniform nominal rewrite rule. If
∆ ` s0 ≈α s →hR,π,p,σi t then there exist π 0 , σ 0 and t0 such that ∆ ` s0 →hR,π0 ,p,σ0 i t0 ≈α t.
Proof. By induction on the length of p. Suppose R = ∇ ` l → r.
Case p = ε. By the definition of rewrite relation, we have s ≈α lπ σ. From the hypothesis,
we have s0 ≈α lπ σ using transitivity of ≈α . Thus, the claim follows by taking π 0 = π, σ 0 = σ
and t0 = t.
22
Case p = ip0 . For the cases s = f u and s = (u1 , . . . , un ), it is easily seen that the
claim follows from the induction hypothesis. So we only consider the case s = [a]u. By the
definition of the rewrite relation, we have u = C[v]p0 , ∆ ` v ≈α lπ σ, ∇π σ, t = [a]C[rπ σ]p0 .
By the hypothesis ∆ ` [a]u ≈α s0 , we have s0 = [b]u0 from the rules for α-equivalence. For
the case a = b, the claim follows from the induction hypothesis, so we only consider the case
a 6= b. In this case, we have ∆ ` (a b)&middot;u ≈α u0 , b#u from the rule for α-equivalence. By
Proposition B.3(2), we have ∆ ` u ≈α (a b)&middot;u0 . By the definition of the rewrite relation,
we have ∆ ` u →hR,π,p0 ,σi C[rπ σ]p0 . Using the induction hypothesis for these properties,
we have ∆ ` (a b)&middot;u0 →hR,π̂,p0 ,σ̂i v 0 ≈α C[rπ σ]p0 for some π̂, σ̂, v 0 . Thus, by Lemma B.7,
we have ∆ ` u0 →hR,(a b)◦π̂,p0 ,(a b)&middot;σi (a b)&middot;v 0 . By the definition of the rewrite relation,
we have ∆ ` [b]u0 →hR,(a b)◦π̂,p,(a b)&middot;σi [b](a b)&middot;v 0 . Now, we consider ∆ ` u →hR,π,p0 ,σi
C[rπ σ]p0 , b#u. By Proposition B.8, we have ∆ ` b#C[rπ σ]p0 and by ∆ ` v 0 ≈α C[rπ σ]p0
and Proposition B.3(2), we have ∆ ` (a b)&middot;v 0 ≈α (a b)&middot;C[rπ σ]p0 . From these properties,
we have ∆ ` [a]C[rπ σ]p0 ≈α [b](a b)&middot;v 0 by the rule for α-equivalence. Thus, we have
∆ ` [b]u0 →hR,(a b)◦π̂,p,(a b)&middot;σ̂i [b](a b)&middot;v 0 ≈α [a]C[rπ σ]p0 . Hence, the claim follows by taking
π 0 = (a b) ◦ π̂, σ 0 = (a b)&middot;σ̂ and t0 = [b](a b)&middot;v 0 .
J
I Lemma B.10.
1. If Γ ` s ≈α t and ∆ ` Γσ then ∆ ` sσ ≈α tσ.
2. If Γ ` s →R t and ∆ ` Γσ then ∆ ` sσ →R tσ.
Proof. 1. By induction on the derivation of Γ ` s ≈α t, similarly to the proof of Lemma 22
in [FG07]. If the last applied rule of the derivation is the one for moderated variables,
then we use Lemma B.3(4).
2. Using 1, we can show the claim similarly to the proof of Theorem 49(2) in [FG07].
J
I Lemma B.11.
1. If Γ ` s ≈α t and ∆ ` Γπ θ then ∆ ` C[sπ θ] ≈α C[tπ θ].
2. If Γ ` s →R t and ∆ ` Γπ θ then ∆ ` C[sπ θ] →R C[tπ θ].
Proof. 1. Suppose Γ ` s ≈α t and ∆ ` Γπ θ. Then by Lemma B.6, we have ∆ ` Γ(π −1 &middot;θ),
and so by Lemma B.10(1), we have ∆ ` s(π −1 &middot;θ) ≈α t(π −1 &middot;θ). Hence by Lemmas B.3(2)
and B.5, we have ∆ ` sπ θ ≈α tπ θ, and by Lemma B.4, we obtain ∆ ` C[sπ θ] ≈α C[tπ θ].
2. Similar, using Lemmas B.10(2) and B.7 instead of Lemmas B.10(1) and B.3(2).
J
References
FG07
M. Fern&aacute;ndez and M. J. Gabbay. Nominal rewriting. Information and Computation,
205:917–965, 2007.
```