23.08.2013 Views

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.4 Mathematical Preliminaries 237<br />

an image in W is called the domain <strong>of</strong> f . It is denoted by Dom(f ). The collection <strong>of</strong> all<br />

elements in W that are image <strong>of</strong> some element in V is called the range <strong>of</strong> f . The range <strong>of</strong><br />

f is denoted by Rng(f ).<br />

Undefinedness<br />

Not all elements <strong>of</strong> V have necessarily an image in W under f . If an element v has no<br />

image, i.e. if ¡ ¡ v Dom(f ), we <strong>of</strong>ten write f (v) undef, denoting that f (v) is ’undefined’.<br />

v¥ v¡ ¡ ¡<br />

Variant Notation<br />

Let f be a partial function from V to W, let V and w W. then f £<br />

© v¦ w equals<br />

function f , except in domain element v, there it is w. f £<br />

© v¦ w is defined by<br />

f £<br />

w © v¦ (v¡ )<br />

¡<br />

¡ £<br />

¢<br />

f (v¡ ) if v¡ ¡<br />

v and v¡ ¡ Dom(f )<br />

w if v¡ v<br />

undef if v¡ ¡<br />

v and v¡ ¡<br />

Dom(f ) ¡<br />

The notation is called the variant notation for functions. In the context <strong>of</strong> defining a<br />

language semantics, it appears to be a very convenient notation.<br />

Restriction<br />

Another convenient notation for functions is the restriction operator ¤ . Let f be a partial<br />

function from V to W and let Z ¥ V be a subset <strong>of</strong> V. Then f ¤ Z denotes the partial<br />

function from V to W that is the same as f except that its domain is restricted to Z. Let<br />

v ¡ V. Then f ¤ Z is defined by<br />

£ § f Z<br />

undef if ¡ ¡ v Dom ¢<br />

£ § f Z<br />

f ¤ Z(v) ¦¥ f (v) if v ¡ Dom ¢<br />

£ w1© ¥¡ ¡ ¡ ¥ ©<br />

Complete Functions<br />

A special kind <strong>of</strong> partial function is a complete function. If f is a complete function from<br />

V to W, then each element in V has an image in W. This can also be expressed as<br />

Dom(f ) V. To denote that f is a complete function from V to W we will use the<br />

notation f : V W. We will <strong>of</strong>ten write v1 wn vn to denote a function f for<br />

which f ¢<br />

§ vi£ § wi (1 i n) and f ¢<br />

v£ v otherwise.<br />

7.4.5 Inductive Definitions and Pro<strong>of</strong>s by Induction<br />

Inductive Definitions<br />

The main mathematical tool that we will use is induction. Many relations, functions<br />

and sets will be defined in an inductive way. There exist many notations for inductive<br />

definitions. In principle, however, they all boil down to a single notion. Basically, an<br />

inductive definition consists <strong>of</strong> a number <strong>of</strong> inference rules. An inference rule is <strong>of</strong> the<br />

form<br />

premises<br />

conclusion<br />

if condition

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

Saved successfully!

Ooh no, something went wrong!