30.01.2013 Views

Logical Analysis and Verification of Cryptographic Protocols - Loria

Logical Analysis and Verification of Cryptographic Protocols - Loria

Logical Analysis and Verification of Cryptographic Protocols - Loria

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.1. PRELIMINARIES 21<br />

the function symbols, arity : F → N. The arity <strong>of</strong> a function symbol indicates<br />

the number <strong>of</strong> arguments that it expects. We call signature the tuple (F, arity),<br />

<strong>and</strong> for simplicity, in this document, we denote by signature only the set F.<br />

We define the set <strong>of</strong> terms T (F, X ) over the signature F to be the smallest set<br />

containing X , C , <strong>and</strong> such that if f is a function symbol in F with arity n ≥ 0,<br />

<strong>and</strong> if t1, . . . , tn are terms in T (F, X ), then f(t1, . . . , tn) is a term in T (F, X ). We<br />

define the set <strong>of</strong> ground terms T (F) over the signature F to be biggest subset <strong>of</strong><br />

the set <strong>of</strong> terms T (F, X ) such that T (F) does not contain variables. We denote<br />

the set <strong>of</strong> variables (respectively set <strong>of</strong> free constants) occurring in a term t by<br />

V ar(t) (respectively Cons(t)). A term without variables, i.e. a term in T (F),<br />

is called ground term. If T, T ′ are two sets <strong>of</strong> terms, <strong>and</strong> t, t ′ are two terms, we<br />

abbreviate T ∪ T ′ by T, T ′ , T ∪ {t} by T, t, T \ {t} by T \ t, <strong>and</strong> {t, t ′ } by t, t ′ .<br />

2.1.3 Positions <strong>and</strong> subterms<br />

The subterms <strong>of</strong> a term t are denoted by the set <strong>of</strong> terms Sub(t) which is defined<br />

recursively as follows. If t ∈ X ∪ C then Sub(t) = {t}, <strong>and</strong> if t = g(t1, . . . , tn)<br />

then Sub(t) = {t} ∪ ( �n i=1 Sub(ti)). The strict (or proper) subterms <strong>of</strong> a term t are<br />

denoted by the set <strong>of</strong> terms SSub(t), <strong>and</strong> SSub(t) = Sub(t) \ t. We denote t[s] a<br />

term t that admits s as subterm.<br />

Example 4 Consider the term t = Sig(h(a), Sk(Bob)).<br />

We have: Sub(t) = {t, h(a), Sk(Bob), a, Bob}, <strong>and</strong> SSub(t) =<br />

{h(a), Sk(Bob), a, Bob}.<br />

We call positions the elements <strong>of</strong> N ∗ . We say that a position p is smaller than a<br />

position q, <strong>and</strong> we write p ≤ q, if p is a prefix <strong>of</strong> q, i.e. there exists a position p ′<br />

such that p.p ′ = q. Given a term t, the set <strong>of</strong> positions <strong>of</strong> t, denoted by P os(t), is<br />

defined recursively as follows:<br />

• if t is a variable or a constant then P os(t) = {ɛ};<br />

• if t = f(t1, . . . , tn) then P os(t) = {ɛ} ∪ ( �<br />

1≤i≤n {i.p such that p ∈ P os(ti)}).<br />

The position ɛ is called the root position <strong>of</strong> the term t. The dag-size <strong>of</strong> a term t,<br />

denoted by �t�dag, is defined to be the number <strong>of</strong> distinct subterms <strong>of</strong> t.<br />

The T op symbol <strong>of</strong> a term t, denoted by T op(t), is defined by T op : T (F, X ) →<br />

F ∪ X ∪ C, with<br />

• T op(t) = t if t ∈ X ∪ C<br />

• T op(t) = f if t = f(t1, . . . , tn)<br />

The subterm <strong>of</strong> t at position p ∈ P os(t), denoted by t|p, is defined recursively<br />

as follows:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!