Nominal Completion for Rewrite Systems with Binders Maribel Fern - - PowerPoint PPT Presentation

nominal completion for rewrite systems with binders
SMART_READER_LITE
LIVE PREVIEW

Nominal Completion for Rewrite Systems with Binders Maribel Fern - - PowerPoint PPT Presentation

Nominal Completion for Rewrite Systems with Binders Maribel Fern andez Kings College London July 2012 Joint work with Albert Rubio M. Fern andez Nominal Completion for Rewrite Systems with Binders Summary Motivations Nominal


slide-1
SLIDE 1

Nominal Completion for Rewrite Systems with Binders

Maribel Fern´ andez

King’s College London

July 2012 Joint work with Albert Rubio

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-2
SLIDE 2

Summary

Motivations Nominal Rewriting Closed nominal rules Confluence and Termination Completion Future work

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-3
SLIDE 3

First-order languages vs. languages with binders

First-order data structures: numbers, lists, trees, etc. available in most programming languages. Few languages provide data structures with binding, needed in type checkers, program analysers, compilers, etc.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-4
SLIDE 4

Binding operators: Examples

Some concrete examples of binding operators (informally):

  • Operational semantics:

let a = N in M − → (fun a.M)N

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-5
SLIDE 5

Binding operators: Examples

Some concrete examples of binding operators (informally):

  • Operational semantics:

let a = N in M − → (fun a.M)N

  • π-calculus:

P | νa.Q → νa.(P | Q) (a ∈ fv(P))

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-6
SLIDE 6

Binding operators: Examples

Some concrete examples of binding operators (informally):

  • Operational semantics:

let a = N in M − → (fun a.M)N

  • π-calculus:

P | νa.Q → νa.(P | Q) (a ∈ fv(P))

  • Logic equivalences:

P and (∀x.Q) ⇔ ∀x(P and Q) (x ∈ fv(P))

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-7
SLIDE 7

Binders - α-equivalence

Binding operators are defined modulo renaming of bound variables, i.e., α-equivalence. Example: In ∀x.P the variable x can be renamed.

  • α-conversion is implicit, but

∀x.P =α ∀y.P — x may occur in P.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-8
SLIDE 8

Binders - α-equivalence

Binding operators are defined modulo renaming of bound variables, i.e., α-equivalence. Example: In ∀x.P the variable x can be renamed.

  • α-conversion is implicit, but

∀x.P =α ∀y.P — x may occur in P.

  • ∀x.P =α ∀y.P{x → y}

Substitution of a bound name by a term has to avoid capture

  • f other bound names: y fresh?
  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-9
SLIDE 9

Binders - α-equivalence

Binding operators are defined modulo renaming of bound variables, i.e., α-equivalence. Example: In ∀x.P the variable x can be renamed.

  • α-conversion is implicit, but

∀x.P =α ∀y.P — x may occur in P.

  • ∀x.P =α ∀y.P{x → y}

Substitution of a bound name by a term has to avoid capture

  • f other bound names: y fresh?
  • Formal definition.

There are several alternatives.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-10
SLIDE 10

Formally:

Alternatives:

  • Encode in a first-order rewrite system

e.g. use De Bruijn indices, encode alpha using operators such as “lift” and “shift”; explicit substitutions. (-) α-equivalence has to be “implemented” (+) simple notion of substitution, efficient first-order matching

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-11
SLIDE 11

Formally:

Alternatives:

  • Encode in a first-order rewrite system

e.g. use De Bruijn indices, encode alpha using operators such as “lift” and “shift”; explicit substitutions. (-) α-equivalence has to be “implemented” (+) simple notion of substitution, efficient first-order matching

  • Higher-order rewrite systems (CRS, HRS, ERS, etc.), e.g.

app(lam([a]Z(a)), Z ′) → Z(Z ′) (+) Binders, functions, implicit α-equivalence (-) Substitution as a meta-operation, using β (-) Unification is undecidable in general

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-12
SLIDE 12

Alternative: Nominal Approach [Pitts, Gabbay, Urban, ...]

Inspired by nominal set theory (Fraenkel-Mostowski). Key ideas: Freshness conditions a#t, name swapping (a b) · t. Example: app(lam([a]Z), Z ′) → subst([a]Z, Z ′) a#M ⊢ (λ([a]app(M, a)) → M

  • Terms with binders
  • Built-in α-equivalence
  • Efficient matching and unification algorithms
  • Simple notion of substitution (“first-order”), non-capturing

substitution has to be specified using rewrite rules.

  • Dependencies of terms on names are implicit.
  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-13
SLIDE 13

Nominal Syntax [Urban,Pitts,Gabbay: TCS’04]

  • Function symbols: f , g . . .

Variables: M, N, X, Y , . . . Atoms: a, b, . . . Swappings: (a b)

  • Def. (a b)a = b, (a b)b = a, (a b)c = c

Permutations: lists of swappings, denoted π (Id empty).

  • Nominal Terms:

s, t ::= a | π · X | [a]t | f t | (t1, . . . , tn) Id · X written as X.

  • Example (ML): var(a), app(t, t′), lam([a]t), let(t, [a]t′),

letrec[f ]([a]t, t′), subst([a]t, t′) Syntactic sugar: a, (tt′), λa.t, let a = t in t′, letrec fa = t in t′, t[a → t′]

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-14
SLIDE 14

α-equivalence

We use freshness to avoid name capture. a#X means a ∈ fv(X) when X is instantiated. a ≈α a ds(π, π′)#X π · X ≈α π′ · X s1 ≈α t1 · · · sn ≈α tn (s1, . . . , sn) ≈α (t1, . . . , tn) s ≈α t fs ≈α ft s ≈α t [a]s ≈α [a]t a#t s ≈α (a b) · t [a]s ≈α [b]t where ds(π, π′) = {n|π(n) = π′(n)}

  • a#X, b#X ⊢ (a b) · X ≈α X
  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-15
SLIDE 15

α-equivalence

We use freshness to avoid name capture. a#X means a ∈ fv(X) when X is instantiated. a ≈α a ds(π, π′)#X π · X ≈α π′ · X s1 ≈α t1 · · · sn ≈α tn (s1, . . . , sn) ≈α (t1, . . . , tn) s ≈α t fs ≈α ft s ≈α t [a]s ≈α [a]t a#t s ≈α (a b) · t [a]s ≈α [b]t where ds(π, π′) = {n|π(n) = π′(n)}

  • a#X, b#X ⊢ (a b) · X ≈α X
  • b#X ⊢ λ[a]X ≈α λ[b](a b) · X
  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-16
SLIDE 16

Freshness

Also defined by induction: a#b a#[a]s π−1(a)#X a#π · X a#s1 · · · a#sn a#(s1, . . . , sn) a#s a#fs a#s a#[b]s

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-17
SLIDE 17

Nominal Rewriting

Rewriting on nominal terms. Applications:

  • equational reasoning on data structures with binding;
  • algebraic specifications of operators and data structures;
  • operational semantics of programs;
  • compilers, program transformations, etc.
  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-18
SLIDE 18

Nominal Rewriting

Nominal Rewriting Rules: ∆ ⊢ l → r V (r) ∪ V (∆) ⊆ V (l) Example: prenex normal forms in first-order logic a#P ⊢ P ∧ ∀[a]Q → ∀[a](P ∧ Q) a#P ⊢ (∀[a]Q) ∧ P → ∀[a](Q ∧ P) a#P ⊢ P ∨ ∀[a]Q → ∀[a](P ∨ Q) a#P ⊢ (∀[a]Q) ∨ P → ∀[a](Q ∨ P) a#P ⊢ P ∧ ∃[a]Q → ∃[a](P ∧ Q) a#P ⊢ (∃[a]Q) ∧ P → ∃[a](Q ∧ P) a#P ⊢ P ∨ ∃[a]Q → ∃[a](P ∨ Q) a#P ⊢ (∃[a]Q) ∨ P → ∃[a](Q ∨ P) ⊢ ¬(∃[a]Q) → ∀[a]¬Q ⊢ ¬(∀[a]Q) → ∃[a]¬Q Reduction relation generated by (equivariant) nominal matching.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-19
SLIDE 19

Nominal matching problem

l ≈α t where V (l) ∩ V (t) = ∅ has solution (∆, θ) if ∆ ⊢ lθ ≈α t

  • Nominal matching is decidable [Urban, Pitts, Gabbay 2003]
  • A solvable problem Pr has a unique most general solution:

(Γ, θ) such that Γ ⊢ Prθ.

  • Efficient algorithms: linear in time and space [Calves-F.2008]

BTW, nominal unification is quadratic [Calves-F.2010,Levy-Villaret2010].

  • But for general NRSs nominal matching is not sufficient: we

need Equivariant Nominal Matching — NP [Cheney2004].

  • If rules are closed, then nominal matching is sufficient.
  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-20
SLIDE 20

Closed Rules

Intuitively: no free names. R ≡ ∇ ⊢ l → r is closed when (∇′ ⊢ (l′, r′)) ?≈ (∇, A(R′)#V (R) ⊢ (l, r)) has a solution σ (where R′ is a freshened copy of R). Given R ≡ ∇ ⊢ l → r and ∆ ⊢ s we write ∆ ⊢ s

R

→c t when ∆, A(R′)#V (∆, s) ⊢ s R′ → t and call this closed rewriting.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-21
SLIDE 21

Examples

The following rules are not closed: g(a) → a [a]X → X Why?

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-22
SLIDE 22

Examples

The following rule is closed: a#X ⊢ [a]X → X Why?

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-23
SLIDE 23

Examples

The following rules are closed, they define capture-avoiding substitution in the lambda calculus. We introduce a term-former subst which we sugar to t[a→t′]. (Beta) (λ[a]X)X ′ → X[a→X ′] (σApp) (XX ′)[a→Y ] → X[a→Y ]X ′[a→Y ] (σvar) a[a→X] → X (σǫ) a#Y ⊢ Y [a→X] → Y (σfn) b#Y ⊢ (λ[b]X)[a→Y ] → λ[b](X[a→Y ])

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-24
SLIDE 24

Properties of Closed Rewriting

Closed Nominal Rewriting:

  • works uniformly in α equivalence classes of terms.
  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-25
SLIDE 25

Properties of Closed Rewriting

Closed Nominal Rewriting:

  • works uniformly in α equivalence classes of terms.
  • is expressive: can encode Combinatory Reduction Systems.
  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-26
SLIDE 26

Properties of Closed Rewriting

Closed Nominal Rewriting:

  • works uniformly in α equivalence classes of terms.
  • is expressive: can encode Combinatory Reduction Systems.
  • efficient matching.
  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-27
SLIDE 27

Properties of Closed Rewriting

Closed Nominal Rewriting:

  • works uniformly in α equivalence classes of terms.
  • is expressive: can encode Combinatory Reduction Systems.
  • efficient matching.
  • inherits confluence conditions from first order rewriting.
  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-28
SLIDE 28

Confluence

Suppose

1 Ri = ∇i ⊢ li → ri for i = 1, 2 are copies of two rules in R

such that V (R1) ∩ V (R2) = ∅ (R1 and R2 could be copies of the same rule).

2 l1 ≡ L[l′

1] such that ∇1, ∇2, l′ 1 ?≈? l2 has a principal solution

(Γ, θ), so that Γ ⊢ l′

1θ ≈α l2θ and Γ ⊢ ∇iθ for i = 1, 2.

Then Γ ⊢ (r1θ, Lθ[r2θ]) is a critical pair. If L = [-] and R1, R2 are copies of the same rule, or if l′

1 is a

variable, then we say the critical pair is trivial. Critical Pair Lemma: A closed nominal rewrite system where all non-trivial critical pairs are joinable, is locally confluent. Orthogonality: If all the rules are closed, left-linear, and without superpositions nominal rewriting is confluent.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-29
SLIDE 29

Termination

Many techniques for first-order systems: well developed area. Example: recursive path ordering [Dershowitz] rpo: A well-founded precedence on function symbols generates a well-founded ordering on first-order terms.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-30
SLIDE 30

Nominal rpo - Version 1

Idea:

  • Equate all atoms (by collapsing them into a unique atom a).
  • Precedence: extend a precedence on the signature Σ ∪ {a, [a]·}

Formally:

1 ˆ

t coincides with t except that all the atoms have been replaced by a distinguished atom a.

2 ∆ ⊢ s > t if ˆ

s >rpo ˆ t using a precedence >Σ on Σ ∪ {a, [a]·}, such that f >Σ [a]· >Σ a for all f ∈ Σ.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-31
SLIDE 31

Nominal rpo version 1

Let ∆ be a freshness context, s, t nominal terms over Σ, and >Σ a precedence on Σ. We write ∆ ⊢ s > t, if ˆ s > ˆ t as defined below, where ≥ is the reflexive closure of >, and >mul is the multiset extension of >.

1 [a]s > t if s ≥ t 2 s > [a]t if root(s) ∈ Σ and s > t 3 [a]s > [a]t if s > t 4 [a]s > a 5 f (s1, . . . , sn) > t if si ≥ t for some i, f ∈ Σ 6 f (s1, . . . , sn) > g(t1, . . . , tm) if f >Σ g and f (s1, . . . , sn) > ti

for all i

7 f (s1, . . . , sn) > a 8 f (s1, . . . , sn) > g(t1, . . . , tm) if f =Σ g and

{s1, . . . , sn} >mul {t1, . . . , tm}.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-32
SLIDE 32

Examples

We can order the nominal rewriting rules that compute prenex normal form of first-order logic formulas: Use a precedence ∧ >Σ ∀, ∧ >Σ ∃, ∨ >Σ ∀, ∨ >Σ ∃, ¬ >Σ ∀, ¬ >Σ ∃ Then a#P ⊢ P ∧ ∀[a]Q > ∀[a](P ∧ Q)

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-33
SLIDE 33

Example[Jouannaud-RubioCSL2008]

HORPO to compare terms in λ-calculus extended with constants Example: ⊢ f (g([x]f (x, x)), g([x]f (x, x))) > [x]f (x, x) in the HORPO and also in the nominal rpo (because g([a]f (a, a)) > a). More interesting: ⊢ f (g(X, Y ))) > g(X, [a]f (h(Y , a))) using the nominal rpo but not comparable with HORPO Proof: Assume f >Σ g >Σ h, then ⊢ f (g(X, Y ))) > X and ⊢ f (g(X, Y ))) > [a]f (h(Y , a))). The first one is trivial (subterm relation). For the second, we show ⊢ f (g(X, Y ))) > f (h(Y , a))), which requires g(X, Y ) > h(Y , a). Since g(X, Y ) > Y , and g(X, Y ) > a, we are done.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-34
SLIDE 34

Nominal rpo - Version 1

Properties It is a reduction ordering:

1 transitive, irreflexive, well-founded, and preserved by context

and substitution, because we have ∆ ⊢ s > t if and only if ˆ s >rpo ˆ t

2 preserved by ≈α, that is, it works uniformly in α-equivalence

classes Not preserved under atom substitution. To obtain an ordering preserved by atom substitution we need to distinguish unabstracted atoms.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-35
SLIDE 35

Nominal rpo

Let >Σ be a precedence on Σ. Let C = {c1, c2, . . .} such that C ∩ A(∆, s, t) = ∅ ∆ ⊢ s > t, defined by cases below, where ≥ is > ∪ ⊲ ⊳.

1 ∆ ⊢ [a]s > t if ∆ ∪ ∆c#s,t ⊢ (a c) · s ≥ t, for an arbitrary

c ∈ C − A(∆, [a]s, t).

2 ∆ ⊢ s > [a]t if root(s) ∈ Σ and ∆ ∪ ∆c#s,t ⊢ s > (a c) · t,

for an arbitrary c ∈ C − A(∆, s, [a]t).

3 ∆ ⊢ [a]s > [b]t if ∆ ∪ ∆c#s,t ⊢ (a c) · s > (b c) · t, for an

arbitrary c ∈ C − A(∆, [a]s, [b]t).

4 ∆ ⊢ [a]s > [a]t if ∆ ⊢ s > t. 5 ∆ ⊢ [a]s > c if c ∈ C. 6 ∆ ⊢ f (s1, . . . , sn) > t if ∆ ⊢ si ≥ t for some i. 7 ∆ ⊢ f (s1, . . . , sn) > g(t1, . . . , tm) if f >Σ g and

∆ ⊢ f (s1, . . . , sn) > ti for all i.

8 ∆ ⊢ f (s1, . . . , sn) > c if c ∈ C. 9 ∆ ⊢ f (s1, . . . , sn) > g(t1, . . . , tm) if f =Σ g and

∆ ⊢ {s1, . . . , sn} >mul {t1, . . . , tm}.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-36
SLIDE 36

Examples

Precedence to order the rules for prenex normal form: ∧ >Σ ∀, ∧ >Σ ∃, ∨ >Σ ∀, ∨ >Σ ∃, ¬ >Σ ∀, ¬ >Σ ∃ Example: a#P ⊢ P ∧ ∀[a]Q >nrpo ∀[a](P ∧ Q) Proof: since ∧ >Σ ∀, we show a#P ⊢ P ∧ ∀[a]Q > [a](P ∧ Q) We have an abstraction in the rhs, so we show a#P, c#P, c#Q ⊢ P ∧ ∀[a]Q > (a c) · P ∧ (a c) · Q We now compare their subterms. Since a#P, c#P, c#Q ⊢ P ≈α (a c) · P, it boils down to proving a#P, c#P, c#Q ⊢ ∀[a]Q > (a c) · Q, We show a#P, c#P, c#Q ⊢ [a]Q ≥ (a c) · Q This is a consequence of a#P, c#P, c#Q, c′#Q ⊢ (a c′) · Q ≥ (a c) · Q, which holds since ds((a c′), (a c)) = {a, c, c′} and we can derive a#P, c#P, c#Q, c′#Q ⊢ (a c′) · Q ⊲ ⊳ (a c) · Q

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-37
SLIDE 37

Properties

The nominal rpo has the following properties:

1 If ∆ ⊢ s >nrpo t then: 1

For all C[-], ∆ ⊢ C[s] >nrpo C[t].

2

For all π, ∆ ⊢ π · s >nrpo π · t.

3

For all Γ such that Γ ⊢ ∆σ, Γ ⊢ sσ >nrpo tσ.

2 It is a decidable, irreflexive and transitive relation. 3 It is well founded when the precedence is well-founded: there

are no infinite descending chains ∆ ⊢ s1 >nrpo s2 >nrpo . . .

4 Compatible with ≈α and preserved by capture-avoiding

atom-substitution.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-38
SLIDE 38

Confluence and Termination of Nominal Rewriting

If an equational theory can be represented by a confluent and terminating rewrite system, then equational reasoning can be mechanised. Closed rewriting is sufficient to decide equality modulo a nominal equational theory if the axioms can be oriented to form a confluent and terminating closed NRS [LFMTP2010].

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-39
SLIDE 39

Confluence and Termination of Nominal Rewriting

Theorem If for all ∇ ⊢ l → r in an NRS R we have ∇ ⊢ l > r, where > is one of the orderings defined above, then R is terminating. Newman’s Lemma: Local confluence + termination implies confluence.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-40
SLIDE 40

Kunth-Bendix Completion

If a nominal rewriting system is not confluent, but it is terminating: compute critical pairs and try to add rules to join them. Key ideas:

  • Critical pair lemma
  • Nominal rpo to check termination
  • Critical pairs CAN be added as rules (no problems with types
  • r format as in other rewriting formalisms that manipulate

binders)

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-41
SLIDE 41

Nominal Completion

Transformation rules on pairs (E, R) (closed nominal equations and nominal rewriting rules) Input: (E, ∅) and a (well-founded) reduction ordering > Transformation rules: (E, R) ⇒ (E ∪ ∆ ⊢ s = t, R) if ∆ ⊢ (s, t) critical pair of R (E ∪ ∆ ⊢ s = t, R) ⇒ (E, R ∪ ∆ ⊢ s → t) if ∆ ⊢ s > t (E ∪ ∆ ⊢ s = t, R) ⇒ (E, R ∪ ∆ ⊢ t → s) if ∆ ⊢ t > s (E ∪ ∆ ⊢ s = t, R) ⇒ (E, R) if ∆ ⊢ s ≈α t (E ∪ ∆ ⊢ s = t, R) ⇒ (E ∪ ∆ ⊢ s′ = t, R) if ∆ ⊢ s →c

R s′

(E ∪ ∆ ⊢ s = t, R) ⇒ (E ∪ ∆ ⊢ s = t′, R) if ∆ ⊢ t →c

R t′

(E, R ∪ ∆ ⊢ s → t) ⇒ (E, R ∪ ∆ ⊢ s → t′) if ∆ ⊢ t →c

R t′

(E, R ∪ ∆ ⊢ s → t) ⇒ (E ∪ ∆ ⊢ s′ = t, R) if ∆ ⊢ s →c

R s′

As in the case of first-order rewriting, the rule that computes critical pairs should be used in a controlled way.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-42
SLIDE 42

Example

The following rules are inspired by [Nipkow-Prehofer1998]. As ordering take nrpo with any precedence. (η) a#X ⊢ λ([a]app(X, a)) → X (⊥) app(⊥, Y ) → ⊥ There is a critical pair since the unification problem a#X, app(X, a) ?≈? app(⊥, Y ) has solution {X → ⊥, Y → a}: λ([a]⊥) = ⊥ can be oriented into λ([a]⊥) → ⊥.

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-43
SLIDE 43

Example

The following rules are inspired by Van de Pol’s PhD thesis (1996). As ordering take nrpo with precedence Σ > + and Σ > app > id. a#F ⊢ Σ(0, [a]app(F, a)) → 0 a#F ⊢ Σ(s(N), [a]app(F, a)) → app(F, s(N)) + Σ(N, [a]app(F, a)) id(X) → X app(id0, X) → id(X) With the fourth rule applied on the first and second we obtain two critical pairs: Σ(0, [a]id(a)) = 0 and Σ(s(N), [a]id(a)) = app(id0, s(N)) + Σ(N, [a]app(id0, a)) which can be simplified and oriented as follows: Σ(0, [a]a) → 0 and Σ(s(N), [a]a) → s(N) + Σ(N, [a]a).

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders

slide-44
SLIDE 44

Conclusion

  • Nominal Terms: extension of first-order syntax, efficient

matching modulo α.

  • Clean semantics: Nominal Sets
  • Equational reasoning and rewriting

Completion as a tool to mechanise nominal equational logic

  • Future work: functional abstraction and capture-avoiding

substitution, more powerful type systems, ...

  • M. Fern´

andez Nominal Completion for Rewrite Systems with Binders