
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This lecture was delivered by Sharman Munjha Jadeja at Birla Institute of Technology and Science for Formal Specification Methods in Software Development course. It includes: Partial, Functions, Introduction, Organization, Total, Lambda, Relations, Formalism, Restriction, Operators
Typology: Slides
1 / 24
This page cannot be seen from the preview
Don't miss anything!

















Example 8.1 An organization has a system for keeping track of its employees while they are on the premises. Each employee is issued with an active badge which reports their current position to a central database.
Total Functions
Definition: if each element of X is related to unique element of Y then partial function is a total function denoted by X Y.
X Y == { f : XY | dom f = X • f }
b c
d
1
2 3
X f Y
Example : Total Functions
Lambda Functions
f = {x :X | p x e}
Functions on Relations
We introduced the operators that form the basis of a calculus of relations, i.e., domain, range, inverse, composition, and closure, are examples of functions upon relations
[X, Y] dom : (X Y) X ran : (X Y) Y
R : (X Y) dom R = { x : X | ( y : Y x y R) x} ran R = {y : Y | ( x : X x y R) y}
Formalism of Restriction Operators
A R = { x : X; y : Y | x A x y R x y} R B = { x : X; y : Y | y B x y R xdocsity.com
The relational composition operator may be defined as
R : (X Y); S : (Y Z) R S = { x : X; y : Y, z : Z | x y R y z S x z}
The relational inverse operator may be defined as
R~^ = { x : X; y : Y | x y R y x}
[X, Y] _ _ : (X Y) (X Y)
f, g : X Y f g = (dom g f) g
Example 8.15 The location function, where_is, is not injective
where_is = {otto lobby, peter meeting, quentin meeting, rachel meeting}
According to where_is, there are at least two different people in the meeting room, i.e.,
where_is quentin = meeting
where_is peter = meeting
where, quentin, peter
Example 8.18 : If s and t are the two sets {1, 2} and {a, b, c} respectively, then the set of all partial injective functions from s to t is given by
X Y = {,? }