Theoretic is m

57
Theoreticism From Wikipedia, the free encyclopedia

description

1. From Wikipedia, the free encyclopedia2. Lexicographical order

Transcript of Theoretic is m

  • TheoreticismFrom Wikipedia, the free encyclopedia

  • Contents

    1 Binary relation 11.1 Formal denition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    1.1.1 Is a relation more than its graph? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.1.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    1.2 Special types of binary relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2.1 Difunctional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    1.3 Relations over a set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Operations on binary relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    1.4.1 Complement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.4.2 Restriction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.4.3 Algebras, categories, and rewriting systems . . . . . . . . . . . . . . . . . . . . . . . . . 7

    1.5 Sets versus classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.6 The number of binary relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.7 Examples of common binary relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.8 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.9 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.10 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.11 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    2 Finitary relation 112.1 Informal introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2 Relations with a small number of places . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.3 Formal denitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.4 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.5 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.6 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.8 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    3 Ontology components 153.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.2 Individuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.3 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    i

  • ii CONTENTS

    3.4 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.5 Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    4 Property (philosophy) 204.1 Essential and accidental properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.2 Determinate and determinable properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.3 Lovely and suspect qualities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.4 Property dualism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.5 Properties in mathematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.6 Properties and predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.7 Intrinsic and extrinsic properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224.8 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224.9 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224.10 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224.11 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    5 Relation of Ideas 235.1 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    6 Relational algebra 246.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    6.1.1 Set operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246.1.2 Projection () . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246.1.3 Selection () . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256.1.4 Rename () . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

    6.2 Joins and join-like operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256.2.1 Natural join () . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256.2.2 -join and equijoin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266.2.3 Semijoin ()() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266.2.4 Antijoin () . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276.2.5 Division () . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

    6.3 Common extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286.3.1 Outer joins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286.3.2 Operations for domain computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296.3.3 Transitive closure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

    6.4 Use of algebraic properties for query optimization . . . . . . . . . . . . . . . . . . . . . . . . . . 306.4.1 Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306.4.2 Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.4.3 Rename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    6.5 Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.6 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

  • CONTENTS iii

    6.7 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346.8 Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346.9 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    7 Relational theory 357.1 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357.2 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

    8 Relativism 378.1 Forms of relativism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    8.1.1 Anthropological versus philosophical relativism . . . . . . . . . . . . . . . . . . . . . . . 378.1.2 Descriptive versus normative relativism . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    8.2 Postmodernism and relativism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388.3 Related and contrasting positions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388.4 Theatre and relativism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398.5 Catholic Church and relativism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

    8.5.1 Leo XIII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398.5.2 John Paul II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398.5.3 Benedict XVI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

    8.6 Criticisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408.7 Advocates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    8.7.1 Indian religions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418.7.2 Sophists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418.7.3 Bernard Crick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418.7.4 Paul Feyerabend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428.7.5 Thomas Kuhn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428.7.6 George Lako and Mark Johnson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438.7.7 Robert Nozick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438.7.8 Joseph Margolis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438.7.9 Richard Rorty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448.7.10 Isaiah Berlin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    8.8 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448.9 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458.10 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478.11 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    9 Ternary relation 489.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

    9.1.1 Binary functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489.1.2 Cyclic orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489.1.3 Betweenness relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489.1.4 Congruence relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

  • iv CONTENTS

    9.1.5 Typing relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499.2 Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499.3 Text and image sources, contributors, and licenses . . . . . . . . . . . . . . . . . . . . . . . . . . 50

    9.3.1 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509.3.2 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519.3.3 Content license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

  • Chapter 1

    Binary relation

    Relation (mathematics)" redirects here. For a more general notion of relation, see nitary relation. For a morecombinatorial viewpoint, see theory of relations. For other uses, see Relation Mathematics.

    In mathematics, a binary relation on a set A is a collection of ordered pairs of elements of A. In other words, it is asubset of the Cartesian product A2 = A A. More generally, a binary relation between two sets A and B is a subsetof A B. The terms correspondence, dyadic relation and 2-place relation are synonyms for binary relation.An example is the "divides" relation between the set of prime numbers P and the set of integers Z, in which everyprime p is associated with every integer z that is a multiple of p (but with no integer that is not a multiple of p). Inthis relation, for instance, the prime 2 is associated with numbers that include 4, 0, 6, 10, but not 1 or 9; and theprime 3 is associated with numbers that include 0, 6, and 9, but not 4 or 13.Binary relations are used in many branches of mathematics to model concepts like "is greater than", "is equal to", anddivides in arithmetic, "is congruent to" in geometry, is adjacent to in graph theory, is orthogonal to in linearalgebra and many more. The concept of function is dened as a special kind of binary relation. Binary relations arealso heavily used in computer science.A binary relation is the special case n = 2 of an n-ary relation R A1 An, that is, a set of n-tuples where thejth component of each n-tuple is taken from the jth domain Aj of the relation. An example for a ternary relation onZZZ is lies between ... and ..., containing e.g. the triples (5,2,8), (5,8,2), and (4,9,7).In some systems of axiomatic set theory, relations are extended to classes, which are generalizations of sets. Thisextension is needed for, among other things, modeling the concepts of is an element of or is a subset of in settheory, without running into logical inconsistencies such as Russells paradox.

    1.1 Formal denition

    A binary relation R is usually dened as an ordered triple (X, Y, G) where X and Y are arbitrary sets (or classes), andG is a subset of the Cartesian product X Y. The sets X and Y are called the domain (or the set of departure) andcodomain (or the set of destination), respectively, of the relation, and G is called its graph.The statement (x,y) G is read "x is R-related to y", and is denoted by xRy or R(x,y). The latter notation correspondsto viewing R as the characteristic function on X Y for the set of pairs of G.The order of the elements in each pair of G is important: if a b, then aRb and bRa can be true or false, independentlyof each other. Resuming the above example, the prime 3 divides the integer 9, but 9 doesn't divide 3.A relation as dened by the triple (X, Y, G) is sometimes referred to as a correspondence instead.[1] In this case therelation from X to Y is the subset G of X Y, and from X to Y" must always be either specied or implied by thecontext when referring to the relation. In practice correspondence and relation tend to be used interchangeably.

    1

  • 2 CHAPTER 1. BINARY RELATION

    1.1.1 Is a relation more than its graph?According to the denition above, two relations with identical graphs but dierent domains or dierent codomainsare considered dierent. For example, ifG = f(1; 2); (1; 3); (2; 7)g , then (Z;Z; G) , (R;N; G) , and (N;R; G) arethree distinct relations, where Z is the set of integers and R is the set of real numbers.Especially in set theory, binary relations are often dened as sets of ordered pairs, identifying binary relations withtheir graphs. The domain of a binary relation R is then dened as the set of all x such that there exists at least oney such that (x; y) 2 R , the range of R is dened as the set of all y such that there exists at least one x such that(x; y) 2 R , and the eld of R is the union of its domain and its range.[2][3][4]A special case of this dierence in points of view applies to the notion of function. Many authors insist on distin-guishing between a functions codomain and its range. Thus, a single rule, like mapping every real number x tox2, can lead to distinct functions f : R ! R and f : R ! R+ , depending on whether the images under thatrule are understood to be reals or, more restrictively, non-negative reals. But others view functions as simply sets ofordered pairs with unique rst components. This dierence in perspectives does raise some nontrivial issues. As anexample, the former camp considers surjectivityor being ontoas a property of functions, while the latter sees itas a relationship that functions may bear to sets.Either approach is adequate for most uses, provided that one attends to the necessary changes in language, notation,and the denitions of concepts like restrictions, composition, inverse relation, and so on. The choice between the twodenitions usually matters only in very formal contexts, like category theory.

    1.1.2 ExampleExample: Suppose there are four objects {ball, car, doll, gun} and four persons {John, Mary, Ian, Venus}. Supposethat John owns the ball, Mary owns the doll, and Venus owns the car. Nobody owns the gun and Ian owns nothing.Then the binary relation is owned by is given as

    R = ({ball, car, doll, gun}, {John, Mary, Ian, Venus}, {(ball, John), (doll, Mary), (car, Venus)}).

    Thus the rst element of R is the set of objects, the second is the set of persons, and the last element is a set of orderedpairs of the form (object, owner).The pair (ball, John), denoted by RJ means that the ball is owned by John.Two dierent relations could have the same graph. For example: the relation

    ({ball, car, doll, gun}, {John, Mary, Venus}, {(ball, John), (doll, Mary), (car, Venus)})

    is dierent from the previous one as everyone is an owner. But the graphs of the two relations are the same.Nevertheless, R is usually identied or even dened as G(R) and an ordered pair (x, y) G(R)" is usually denoted as"(x, y) R".

    1.2 Special types of binary relationsSome important types of binary relations R between two sets X and Y are listed below. To emphasize that X and Ycan be dierent sets, some authors call such binary relations heterogeneous.[5][6]

    Uniqueness properties:

    injective (also called left-unique[7]): for all x and z in X and y in Y it holds that if xRy and zRy then x = z. Forexample, the green relation in the diagram is injective, but the red relation is not, as it relates e.g. both x = 5and z = +5 to y = 25.

    functional (also called univalent[8] or right-unique[7] or right-denite[9]): for all x in X, and y and z in Yit holds that if xRy and xRz then y = z; such a binary relation is called a partial function. Both relations inthe picture are functional. An example for a non-functional relation can be obtained by rotating the red graphclockwise by 90 degrees, i.e. by considering the relation x=y2 which relates e.g. x=25 to both y=5 and z=+5.

  • 1.2. SPECIAL TYPES OF BINARY RELATIONS 3

    Example relations between real numbers. Red: y=x2. Green: y=2x+20.

    one-to-one (also written 1-to-1): injective and functional. The green relation is one-to-one, but the red is not.

    Totality properties:

    left-total:[7] for all x in X there exists a y in Y such that xRy. For example R is left-total when it is a functionor a multivalued function. Note that this property, although sometimes also referred to as total, is dierentfrom the denition of total in the next section. Both relations in the picture are left-total. The relation x=y2,obtained from the above rotation, is not left-total, as it doesn't relate, e.g., x = 14 to any real number y.

    surjective (also called right-total[7] or onto): for all y in Y there exists an x in X such that xRy. The greenrelation is surjective, but the red relation is not, as it doesn't relate any real number x to e.g. y = 14.

    Uniqueness and totality properties:

  • 4 CHAPTER 1. BINARY RELATION

    A function: a relation that is functional and left-total. Both the green and the red relation are functions. An injective function: a relation that is injective, functional, and left-total. A surjective function or surjection: a relation that is functional, left-total, and right-total. A bijection: a surjective one-to-one or surjective injective function is said to be bijective, also known asone-to-one correspondence.[10] The green relation is bijective, but the red is not.

    1.2.1 DifunctionalLess commonly encountered is the notion of difunctional (or regular) relation, dened as a relation R such thatR=RR1R.[11]

    To understand this notion better, it helps to consider a relation as mapping every element xX to a set xR = { yY| xRy }.[11] This set is sometimes called the successor neighborhood of x in R; one can dene the predecessorneighborhood analogously.[12] Synonymous terms for these notions are afterset and respectively foreset.[5]

    A difunctional relation can then be equivalently characterized as a relation R such that wherever x1R and x2R have anon-empty intersection, then these two sets coincide; formally x1R x2R implies x1R = x2R.[11]

    As examples, any function or any functional (right-unique) relation is difunctional; the converse doesn't hold. If oneconsiders a relation R from set to itself (X = Y), then if R is both transitive and symmetric (i.e. a partial equivalencerelation), then it is also difunctional.[13] The converse of this latter statement also doesn't hold.A characterization of difunctional relations, which also explains their name, is to consider two functions f: A Cand g: B C and then dene the following set which generalizes the kernel of a single function as joint kernel: ker(f,g) = { (a, b) A B | f(a) = g(b) }. Every difunctional relation R A B arises as the joint kernel of two functionsf: A C and g: B C for some set C.[14]

    In automata theory, the term rectangular relation has also been used to denote a difunctional relation. This ter-minology is justied by the fact that when represented as a boolean matrix, the columns and rows of a difunctionalrelation can be arranged in such a way as to present rectangular blocks of true on the (asymmetric) main diagonal.[15]Other authors however use the term rectangular to denote any heterogeneous relation whatsoever.[6]

    1.3 Relations over a setIf X = Y then we simply say that the binary relation is over X, or that it is an endorelation over X.[16] In computerscience, such a relation is also called a homogeneous (binary) relation.[16][17][6] Some types of endorelations arewidely studied in graph theory, where they are known as simple directed graphs permitting loops.The set of all binary relations Rel(X) on a set X is the set 2X X which is a Boolean algebra augmented with theinvolution of mapping of a relation to its inverse relation. For the theoretical explanation see Relation algebra.Some important properties of a binary relation R over a set X are:

    reexive: for all x in X it holds that xRx. For example, greater than or equal to () is a reexive relation butgreater than (>) is not.

    irreexive (or strict): for all x in X it holds that not xRx. For example, > is an irreexive relation, but is not. coreexive: for all x and y in X it holds that if xRy then x = y. An example of a coreexive relation is therelation on integers in which each odd number is related to itself and there are no other relations. The equalityrelation is the only example of a both reexive and coreexive relation.

    The previous 3 alternatives are far from being exhaustive; e.g. the red relation y=x2 from theabove picture is neither irreexive, nor coreexive, nor reexive, since it contains the pair(0,0), and (2,4), but not (2,2), respectively.

    symmetric: for all x and y in X it holds that if xRy then yRx. Is a blood relative of is a symmetric relation,because x is a blood relative of y if and only if y is a blood relative of x.

  • 1.4. OPERATIONS ON BINARY RELATIONS 5

    antisymmetric: for all x and y in X, if xRy and yRx then x = y. For example, is anti-symmetric (so is >, butonly because the condition in the denition is always false).[18]

    asymmetric: for all x and y in X, if xRy then not yRx. A relation is asymmetric if and only if it is bothanti-symmetric and irreexive.[19] For example, > is asymmetric, but is not.

    transitive: for all x, y and z in X it holds that if xRy and yRz then xRz. A transitive relation is irreexive if andonly if it is asymmetric.[20] For example, is ancestor of is transitive, while is parent of is not.

    total: for all x and y in X it holds that xRy or yRx (or both). This denition for total is dierent from left totalin the previous section. For example, is a total relation.

    trichotomous: for all x and y in X exactly one of xRy, yRx or x = y holds. For example, > is a trichotomousrelation, while the relation divides on natural numbers is not.[21]

    Right Euclidean: for all x, y and z in X it holds that if xRy and xRz, then yRz. Left Euclidean: for all x, y and z in X it holds that if yRx and zRx, then yRz. Euclidean: An Euclidean relation is both left and right Euclidean. Equality is a Euclidean relation because if

    x=y and x=z, then y=z. serial: for all x in X, there exists y in X such that xRy. "Is greater than" is a serial relation on the integers. Butit is not a serial relation on the positive integers, because there is no y in the positive integers (i.e. the naturalnumbers) such that 1>y.[22] However, "is less than" is a serial relation on the positive integers, the rationalnumbers and the real numbers. Every reexive relation is serial: for a given x, choose y=x. A serial relation canbe equivalently characterized as every element having a non-empty successor neighborhood (see the previoussection for the denition of this notion). Similarly an inverse serial relation is a relation in which every elementhas non-empty predecessor neighborhood.[12]

    set-like (or local): for every x in X, the class of all y such that yRx is a set. (This makes sense only if relationson proper classes are allowed.) The usual ordering < on the class of ordinal numbers is set-like, while its inverse> is not.

    A relation that is reexive, symmetric, and transitive is called an equivalence relation. A relation that is symmetric,transitive, and serial is also reexive. A relation that is only symmetric and transitive (without necessarily beingreexive) is called a partial equivalence relation.A relation that is reexive, antisymmetric, and transitive is called a partial order. A partial order that is total is calleda total order, simple order, linear order, or a chain.[23] A linear order where every nonempty subset has a least elementis called a well-order.

    1.4 Operations on binary relationsIf R, S are binary relations over X and Y, then each of the following is a binary relation over X and Y :

    Union: R S X Y, dened as R S = { (x, y) | (x, y) R or (x, y) S }. For example, is the union of >and =.

    Intersection: R S X Y, dened as R S = { (x, y) | (x, y) R and (x, y) S }.

    If R is a binary relation over X and Y, and S is a binary relation over Y and Z, then the following is a binary relationover X and Z: (see main article composition of relations)

    Composition: S R, also denoted R ; S (or more ambiguously R S), dened as S R = { (x, z) | there existsy Y, such that (x, y) R and (y, z) S }. The order of R and S in the notation S R, used here agrees withthe standard notational order for composition of functions. For example, the composition is mother of isparent of yields is maternal grandparent of, while the composition is parent of is mother of yields isgrandmother of.

  • 6 CHAPTER 1. BINARY RELATION

    A relation R on sets X and Y is said to be contained in a relation S on X and Y if R is a subset of S, that is, if x R yalways implies x S y. In this case, if R and S disagree, R is also said to be smaller than S. For example, > is containedin .If R is a binary relation over X and Y, then the following is a binary relation over Y and X:

    Inverse or converse: R 1, dened as R 1 = { (y, x) | (x, y) R }. A binary relation over a set is equal to itsinverse if and only if it is symmetric. See also duality (order theory). For example, is less than ().

    If R is a binary relation over X, then each of the following is a binary relation over X:

    Reexive closure: R =, dened as R = = { (x, x) | x X } R or the smallest reexive relation over X containingR. This can be proven to be equal to the intersection of all reexive relations containing R.

    Reexive reduction: R , dened as R = R \ { (x, x) | x X } or the largest irreexive relation over Xcontained in R.

    Transitive closure: R +, dened as the smallest transitive relation over X containing R. This can be seen to beequal to the intersection of all transitive relations containing R.

    Transitive reduction: R , dened as a minimal relation having the same transitive closure as R. Reexive transitive closure: R *, dened as R * = (R +) =, the smallest preorder containing R. Reexive transitive symmetric closure: R , dened as the smallest equivalence relation over X containing

    R.

    1.4.1 ComplementIf R is a binary relation over X and Y, then the following too:

    The complement S is dened as x S y if not x R y. For example, on real numbers, is the complement of >.

    The complement of the inverse is the inverse of the complement.If X = Y, the complement has the following properties:

    If a relation is symmetric, the complement is too. The complement of a reexive relation is irreexive and vice versa. The complement of a strict weak order is a total preorder and vice versa.

    The complement of the inverse has these same properties.

    1.4.2 RestrictionThe restriction of a binary relation on a set X to a subset S is the set of all pairs (x, y) in the relation for which x andy are in S.If a relation is reexive, irreexive, symmetric, antisymmetric, asymmetric, transitive, total, trichotomous, a partialorder, total order, strict weak order, total preorder (weak order), or an equivalence relation, its restrictions are too.However, the transitive closure of a restriction is a subset of the restriction of the transitive closure, i.e., in generalnot equal. For example, restricting the relation "x is parent of y" to females yields the relation "x is mother ofthe woman y"; its transitive closure doesn't relate a woman with her paternal grandmother. On the other hand, thetransitive closure of is parent of is is ancestor of"; its restriction to females does relate a woman with her paternalgrandmother.

  • 1.5. SETS VERSUS CLASSES 7

    Also, the various concepts of completeness (not to be confused with being total) do not carry over to restrictions.For example, on the set of real numbers a property of the relation "" is that every non-empty subset S of R with anupper bound in R has a least upper bound (also called supremum) in R. However, for a set of rational numbers thissupremum is not necessarily rational, so the same property does not hold on the restriction of the relation "" to theset of rational numbers.The left-restriction (right-restriction, respectively) of a binary relation between X and Y to a subset S of its domain(codomain) is the set of all pairs (x, y) in the relation for which x (y) is an element of S.

    1.4.3 Algebras, categories, and rewriting systemsVarious operations on binary endorelations can be treated as giving rise to an algebraic structure, known as relationalgebra. It should not be confused with relational algebra which deals in nitary relations (and in practice also niteand many-sorted).For heterogenous binary relations, a category of relations arises.[6]

    Despite their simplicity, binary relations are at the core of an abstract computation model known as an abstractrewriting system.

    1.5 Sets versus classesCertain mathematical relations, such as equal to, member of, and subset of, cannot be understood to be binaryrelations as dened above, because their domains and codomains cannot be taken to be sets in the usual systems ofaxiomatic set theory. For example, if we try to model the general concept of equality as a binary relation =, wemust take the domain and codomain to be the class of all sets, which is not a set in the usual set theory.In most mathematical contexts, references to the relations of equality, membership and subset are harmless becausethey can be understood implicitly to be restricted to some set in the context. The usual work-around to this problemis to select a large enough set A, that contains all the objects of interest, and work with the restriction =A instead of=. Similarly, the subset of relation needs to be restricted to have domain and codomain P(A) (the power set ofa specic set A): the resulting set relation can be denoted A. Also, the member of relation needs to be restrictedto have domain A and codomain P(A) to obtain a binary relation A that is a set. Bertrand Russell has shown thatassuming to be dened on all sets leads to a contradiction in naive set theory.Another solution to this problem is to use a set theory with proper classes, such as NBG or MorseKelley set theory,and allow the domain and codomain (and so the graph) to be proper classes: in such a theory, equality, membership,and subset are binary relations without special comment. (A minor modication needs to be made to the concept ofthe ordered triple (X, Y, G), as normally a proper class cannot be a member of an ordered tuple; or of course onecan identify the function with its graph in this context.)[24] With this denition one can for instance dene a functionrelation between every set and its power set.

    1.6 The number of binary relations

    The number of distinct binary relations on an n-element set is 2n2 (sequence A002416 in OEIS):Notes:

    The number of irreexive relations is the same as that of reexive relations. The number of strict partial orders (irreexive transitive relations) is the same as that of partial orders. The number of strict weak orders is the same as that of total preorders. The total orders are the partial orders that are also total preorders. The number of preorders that are neithera partial order nor a total preorder is, therefore, the number of preorders, minus the number of partial orders,minus the number of total preorders, plus the number of total orders: 0, 0, 0, 3, and 85, respectively.

    the number of equivalence relations is the number of partitions, which is the Bell number.

  • 8 CHAPTER 1. BINARY RELATION

    The binary relations can be grouped into pairs (relation, complement), except that for n = 0 the relation is its owncomplement. The non-symmetric ones can be grouped into quadruples (relation, complement, inverse, inverse com-plement).

    1.7 Examples of common binary relations order relations, including strict orders:

    greater than greater than or equal to less than less than or equal to divides (evenly) is a subset of

    equivalence relations: equality is parallel to (for ane spaces) is in bijection with isomorphy

    dependency relation, a nite, symmetric, reexive relation. independency relation, a symmetric, irreexive relation which is the complement of some dependency relation.

    1.8 See also Conuence (term rewriting) Hasse diagram Incidence structure Logic of relatives Order theory Triadic relation

    1.9 Notes[1] Encyclopedic dictionary of Mathematics. MIT. 2000. pp. 13301331. ISBN 0-262-59020-4.

    [2] Suppes, Patrick (1972) [originally published by D. van Nostrand Company in 1960]. Axiomatic Set Theory. Dover. ISBN0-486-61630-4.

    [3] Smullyan, Raymond M.; Fitting, Melvin (2010) [revised and corrected republication of the work originally published in1996 by Oxford University Press, New York]. Set Theory and the Continuum Problem. Dover. ISBN 978-0-486-47484-7.

    [4] Levy, Azriel (2002) [republication of the work published by Springer-Verlag, Berlin, Heidelberg and New York in 1979].Basic Set Theory. Dover. ISBN 0-486-42079-5.

    [5] Christodoulos A. Floudas; PanosM. Pardalos (2008). Encyclopedia of Optimization (2nd ed.). Springer Science&BusinessMedia. pp. 299300. ISBN 978-0-387-74758-3.

  • 1.10. REFERENCES 9

    [6] Michael Winter (2007). Goguen Categories: A Categorical Approach to L-fuzzy Relations. Springer. pp. xxi. ISBN978-1-4020-6164-6.

    [7] Kilp, Knauer and Mikhalev: p. 3. The same four denitions appear in the following:

    Peter J. Pahl; Rudolf Damrath (2001). Mathematical Foundations of Computational Engineering: A Handbook.Springer Science & Business Media. p. 506. ISBN 978-3-540-67995-0.

    Eike Best (1996). Semantics of Sequential and Parallel Programs. Prentice Hall. pp. 1921. ISBN 978-0-13-460643-9.

    Robert-Christoph Riemann (1999). Modelling of Concurrent Systems: Structural and Semantical Methods in the HighLevel Petri Net Calculus. Herbert Utz Verlag. pp. 2122. ISBN 978-3-89675-629-9.

    [8] Gunther Schmidt, 2010. Relational Mathematics. Cambridge University Press, ISBN 978-0-521-76268-7, Chapt. 5

    [9] Ms, Stephan (2007), Reasoning on Spatial Semantic Integrity Constraints, Spatial Information Theory: 8th InternationalConference, COSIT 2007, Melbourne, Australiia, September 1923, 2007, Proceedings, Lecture Notes in Computer Science4736, Springer, pp. 285302, doi:10.1007/978-3-540-74788-8_18

    [10] Note that the use of correspondence here is narrower than as general synonym for binary relation.

    [11] Chris Brink; Wolfram Kahl; Gunther Schmidt (1997). Relational Methods in Computer Science. Springer Science &Business Media. p. 200. ISBN 978-3-211-82971-4.

    [12] Yao, Y. (2004). Semantics of Fuzzy Sets in Rough Set Theory. Transactions on Rough Sets II. Lecture Notes in ComputerScience 3135. p. 297. doi:10.1007/978-3-540-27778-1_15. ISBN 978-3-540-23990-1.

    [13] William Craig (2006). Semigroups Underlying First-order Logic. American Mathematical Soc. p. 72. ISBN 978-0-8218-6588-0.

    [14] Gumm, H. P.; Zarrad, M. (2014). Coalgebraic Simulations and Congruences. Coalgebraic Methods in Computer Science.Lecture Notes in Computer Science 8446. p. 118. doi:10.1007/978-3-662-44124-4_7. ISBN 978-3-662-44123-7.

    [15] Julius Richard Bchi (1989). Finite Automata, Their Algebras and Grammars: Towards a Theory of Formal Expressions.Springer Science & Business Media. pp. 3537. ISBN 978-1-4613-8853-1.

    [16] M. E. Mller (2012). Relational Knowledge Discovery. Cambridge University Press. p. 22. ISBN 978-0-521-19021-3.

    [17] Peter J. Pahl; Rudolf Damrath (2001). Mathematical Foundations of Computational Engineering: A Handbook. SpringerScience & Business Media. p. 496. ISBN 978-3-540-67995-0.

    [18] Smith, Douglas; Eggen, Maurice; St. Andre, Richard (2006), A Transition to Advanced Mathematics (6th ed.), Brooks/Cole,p. 160, ISBN 0-534-39900-2

    [19] Nievergelt, Yves (2002), Foundations of Logic and Mathematics: Applications to Computer Science and Cryptography,Springer-Verlag, p. 158.

    [20] Flaka, V.; Jeek, J.; Kepka, T.; Kortelainen, J. (2007). Transitive Closures of Binary Relations I (PDF). Prague: Schoolof Mathematics Physics Charles University. p. 1. Lemma 1.1 (iv). This source refers to asymmetric relations as strictlyantisymmetric.

    [21] Since neither 5 divides 3, nor 3 divides 5, nor 3=5.

    [22] Yao, Y.Y.; Wong, S.K.M. (1995). Generalization of rough sets using relationships between attribute values (PDF).Proceedings of the 2nd Annual Joint Conference on Information Sciences: 3033..

    [23] Joseph G. Rosenstein, Linear orderings, Academic Press, 1982, ISBN 0-12-597680-1, p. 4

    [24] Tarski, Alfred; Givant, Steven (1987). A formalization of set theory without variables. American Mathematical Society. p.3. ISBN 0-8218-1041-3.

    1.10 References M. Kilp, U. Knauer, A.V. Mikhalev, Monoids, Acts and Categories: with Applications to Wreath Products and

    Graphs, De Gruyter Expositions in Mathematics vol. 29, Walter de Gruyter, 2000, ISBN 3-11-015248-7.

    Gunther Schmidt, 2010. Relational Mathematics. Cambridge University Press, ISBN 978-0-521-76268-7.

  • 10 CHAPTER 1. BINARY RELATION

    1.11 External links Hazewinkel, Michiel, ed. (2001), Binary relation, Encyclopedia of Mathematics, Springer, ISBN 978-1-55608-010-4

  • Chapter 2

    Finitary relation

    This article is about the set-theoretic notion of relation. For the common case, see binary relation.For other uses, see Relation (disambiguation).

    In mathematics, a nitary relation has a nite number of places. In set theory and logic, a relation is a propertythat assigns truth values to k -tuples of individuals. Typically, the property describes a possible connection betweenthe components of a k -tuple. For a given set of k -tuples, a truth value is assigned to each k -tuple according towhether the property does or does not hold.An example of a ternary relation (i.e., between three individuals) is: "X was introduced to Y byZ ", where (X;Y; Z)is a 3-tuple of persons; for example, "Beatrice Wood was introduced to Henri-Pierre Roch by Marcel Duchamp" istrue, while "Karl Marx was introduced to Friedrich Engels by Queen Victoria" is false.

    2.1 Informal introductionRelation is formally dened in the next section. In this section we introduce the concept of a relation with a familiareveryday example. Consider the relation involving three roles that people might play, expressed in a statement of theform "X thinks that Y likes Z ". The facts of a concrete situation could be organized in a table like the following:Each row of the table records a fact or makes an assertion of the form "X thinks that Y likes Z ". For instance, therst row says, in eect, Alice thinks that Bob likes Denise. The table represents a relation S over the set P of peopleunder discussion:

    P = {Alice, Bob, Charles, Denise}.

    The data of the table are equivalent to the following set of ordered triples:

    S = {(Alice, Bob, Denise), (Charles, Alice, Bob), (Charles, Charles, Alice), (Denise, Denise, Denise)}.

    By a slight abuse of notation, it is usual to write S(Alice, Bob, Denise) to say the same thing as the rst row ofthe table. The relation S is a ternary relation, since there are three items involved in each row. The relation itselfis a mathematical object dened in terms of concepts from set theory (i.e., the relation is a subset of the Cartesianproduct on {Person X, Person Y, Person Z}), that carries all of the information from the table in one neat package.Mathematically, then, a relation is simply an ordered set.The table for relation S is an extremely simple example of a relational database. The theoretical aspects of databasesare the specialty of one branch of computer science, while their practical impacts have become all too familiar in oureveryday lives. Computer scientists, logicians, and mathematicians, however, tend to see dierent things when theylook at these concrete examples and samples of the more general concept of a relation.For one thing, databases are designed to deal with empirical data, and experience is always nite, whereasmathematicsat the very least concerns itself with potential innity. This dierence in perspective brings up a number of ideas thatmay be usefully introduced at this point, if by no means covered in depth.

    11

  • 12 CHAPTER 2. FINITARY RELATION

    2.2 Relations with a small number of placesThe variable k giving the number of "places" in the relation, 3 for the above example, is a non-negative integer,called the relations arity, adicity, or dimension. A relation with k places is variously called a k -ary, a k -adic, ora k -dimensional relation. Relations with a nite number of places are called nite-place or nitary relations. Itis possible to generalize the concept to include innitary relations between innitudes of individuals, for exampleinnite sequences; however, in this article only nitary relations are discussed, which will from now on simply becalled relations.Since there is only one 0-tuple, the so-called empty tuple ( ), there are only two zero-place relations: the one thatalways holds, and the one that never holds. They are sometimes useful for constructing the base case of an inductionargument. One-place relations are called unary relations. For instance, any set (such as the collection of Nobellaureates) can be viewed as a collection of individuals having some property (such as that of having been awardedthe Nobel prize). Two-place relations are called binary relations or, in the past, dyadic relations. Binary relations arevery common, given the ubiquity of relations such as:

    Equality and inequality, denoted by signs such as ' = ' and ' < ' in statements like ' 5 < 12 '; Being a divisor of, denoted by the sign ' j ' in statements like ' 13 j 143 ';

    Set membership, denoted by the sign ' 2 ' in statements like ' 1 2 N '.

    A k -ary relation is a straightforward generalization of a binary relation.

    2.3 Formal denitionsWhen two objects, qualities, classes, or attributes, viewed together by the mind, are seen under some

    connexion, that connexion is called a relation.Augustus De Morgan[1]

    The simpler of the two denitions of k-place relations encountered in mathematics is:Denition 1. A relation L over the sets X1, , Xk is a subset of their Cartesian product, written L X1 Xk.Relations are classied according to the number of sets in the dening Cartesian product, in other words, accordingto the number of terms following L. Hence:

    Lu denotes a unary relation or property; Luv or uLv denote a binary relation; Luvw denotes a ternary relation; Luvwx denotes a quaternary relation.

    Relations with more than four terms are usually referred to as k-ary or n-ary, for example, a 5-ary relation. A k-aryrelation is simply a set of k-tuples.The second denition makes use of an idiom that is common in mathematics, stipulating that such and such is ann-tuple in order to ensure that such and such a mathematical object is determined by the specication of n componentmathematical objects. In the case of a relation L over k sets, there are k + 1 things to specify, namely, the k sets plusa subset of their Cartesian product. In the idiom, this is expressed by saying that L is a (k + 1)-tuple.Denition 2. A relation L over the sets X1, , Xk is a (k + 1)-tuple L = (X1, , Xk, G(L)), where G(L) is a subsetof the Cartesian product X1 Xk. G(L) is called the graph of L.Elements of a relation are more briey denoted by using boldface characters, for example, the constant element a =(a1, , ak) or the variable element x = (x1, , xk).A statement of the form " a is in the relation L " is taken to mean that a is in L under the rst denition and that a isin G(L) under the second denition.The following considerations apply under either denition:

  • 2.4. HISTORY 13

    The sets Xj for j = 1 to k are called the domains of the relation. Under the rst denition, the relation does notuniquely determine a given sequence of domains.

    If all of the domains Xj are the same set X, then it is simpler to refer to L as a k-ary relation over X. If any of the domains Xj is empty, then the dening Cartesian product is empty, and the only relation over sucha sequence of domains is the empty relation L = ? . Hence it is commonly stipulated that all of the domainsbe nonempty.

    As a rule, whatever denition best ts the application at hand will be chosen for that purpose, and anything that fallsunder it will be called a relation for the duration of that discussion. If it becomes necessary to distinguish the twodenitions, an entity satisfying the second denition may be called an embedded or included relation.If L is a relation over the domains X1, , Xk, it is conventional to consider a sequence of terms called variables, x1,, xk, that are said to range over the respective domains.Let a Boolean domain B be a two-element set, say, B = {0, 1}, whose elements can be interpreted as logical values,typically 0 = false and 1 = true. The characteristic function of the relation L, written L or (L), is the Boolean-valuedfunction L : X1 Xk B, dened in such a way that L( x ) = 1 just in case the k-tuple x is in the relation L.Such a function can also be called an indicator function, particularly in probability and statistics, to avoid confusionwith the notion of a characteristic function in probability theory.It is conventional in appliedmathematics, computer science, and statistics to refer to a Boolean-valued function like Las a k-place predicate. From the more abstract viewpoint of formal logic and model theory, the relation L constitutesa logical model or a relational structure that serves as one of many possible interpretations of some k-place predicatesymbol.Because relations arise in many scientic disciplines as well as in many branches of mathematics and logic, thereis considerable variation in terminology. This article treats a relation as the set-theoretic extension of a relationalconcept or term. A variant usage reserves the term relation to the corresponding logical entity, either the logicalcomprehension, which is the totality of intensions or abstract properties that all of the elements of the relation inextension have in common, or else the symbols that are taken to denote these elements and intensions. Further, somewriters of the latter persuasion introduce terms with more concrete connotations, like relational structure, for theset-theoretic extension of a given relational concept.

    2.4 HistoryThe logician Augustus De Morgan, in work published around 1860, was the rst to articulate the notion of relationin anything like its present sense. He also stated the rst formal results in the theory of relations (on De Morgan andrelations, see Merrill 1990). Charles Sanders Peirce restated and extended De Morgans results. Bertrand Russell(1938; 1st ed. 1903) was historically important, in that it brought together in one place many 19th century results onrelations, especially orders, by Peirce, Gottlob Frege, Georg Cantor, Richard Dedekind, and others. Russell and A.N. Whitehead made free use of these results in their Principia Mathematica.

    2.5 Notes[1] De Morgan, A. (1858) On the syllogism, part 3 in Heath, P., ed. (1966) On the syllogism and other logical writings.

    Routledge. P. 119,

    2.6 See also Correspondence (mathematics) Functional relation Incidence structure Hypergraph

  • 14 CHAPTER 2. FINITARY RELATION

    Logic of relatives Logical matrix Partial order Projection (set theory) Reexive relation Relation algebra Sign relation Transitive relation Relational algebra Relational model

    2.7 References Peirce, C.S. (1870), Description of a Notation for the Logic of Relatives, Resulting from an Amplicationof the Conceptions of Booles Calculus of Logic, Memoirs of the American Academy of Arts and Sciences 9,31778, 1870. Reprinted, Collected Papers CP 3.45149, Chronological Edition CE 2, 359429.

    Ulam, S.M. and Bednarek, A.R. (1990), On the Theory of Relational Structures and Schemata for ParallelComputation, pp. 477508 in A.R. Bednarek and Franoise Ulam (eds.), Analogies Between Analogies: TheMathematical Reports of S.M. Ulam and His Los Alamos Collaborators, University of California Press, Berkeley,CA.

    2.8 Bibliography Bourbaki, N. (1994) Elements of the History of Mathematics, John Meldrum, trans. Springer-Verlag. Carnap, Rudolf (1958) Introduction to Symbolic Logic with Applications. Dover Publications. Halmos, P.R. (1960) Naive Set Theory. Princeton NJ: D. Van Nostrand Company. Lawvere, F.W., and R. Rosebrugh (2003) Sets for Mathematics, Cambridge Univ. Press. Lucas, J. R. (1999) Conceptual Roots of Mathematics. Routledge. Maddux, R.D. (2006) Relation Algebras, vol. 150 in 'Studies in Logic and the Foundations of Mathematics.Elsevier Science.

    Merrill, Dan D. (1990) Augustus De Morgan and the logic of relations. Kluwer. Peirce, C.S. (1984) Writings of Charles S. Peirce: A Chronological Edition, Volume 2, 1867-1871. PeirceEdition Project, eds. Indiana University Press.

    Russell, Bertrand (1903/1938) The Principles of Mathematics, 2nd ed. Cambridge Univ. Press. Suppes, Patrick (1960/1972) Axiomatic Set Theory. Dover Publications. Tarski, A. (1956/1983) Logic, Semantics, Metamathematics, Papers from 1923 to 1938, J.H. Woodger, trans.1st edition, Oxford University Press. 2nd edition, J. Corcoran, ed. Indianapolis IN: Hackett Publishing.

    Ulam, S.M. (1990) Analogies Between Analogies: The Mathematical Reports of S.M. Ulam and His Los AlamosCollaborators in A.R. Bednarek and Franoise Ulam, eds., University of California Press.

    R. Frass, Theory of Relations (North Holland; 2000).

  • Chapter 3

    Ontology components

    Contemporary ontologies share many structural similarities, regardless of the language in which they are expressed.Most ontologies describe individuals (instances), classes (concepts), attributes, and relations.

    3.1 OverviewCommon components of ontologies include:

    Individuals: instances or objects (the basic or ground level objects) Classes: sets, collections, concepts, types of objects, or kinds of things.[1]

    Attributes: aspects, properties, features, characteristics, or parameters that objects (and classes) can have Relations: ways in which classes and individuals can be related to one another Function terms: complex structures formed from certain relations that can be used in place of an individualterm in a statement

    Restrictions: formally stated descriptions of what must be true in order for some assertion to be accepted asinput

    Rules: statements in the form of an if-then (antecedent-consequent) sentence that describe the logical inferencesthat can be drawn from an assertion in a particular form

    Axioms: assertions (including rules) in a logical form that together comprise the overall theory that the ontologydescribes in its domain of application. This denition diers from that of axioms in generative grammar andformal logic. In these disciplines, axioms include only statements asserted as a priori knowledge. As used here,axioms also include the theory derived from axiomatic statements.

    Events: the changing of attributes or relations

    Ontologies are commonly encoded using ontology languages.

    3.2 IndividualsIndividuals (instances) are the basic, ground level components of an ontology. The individuals in an ontology mayinclude concrete objects such as people, animals, tables, automobiles, molecules, and planets, as well as abstractindividuals such as numbers and words (although there are dierences of opinion as to whether numbers and wordsare classes or individuals). Strictly speaking, an ontology need not include any individuals, but one of the generalpurposes of an ontology is to provide a means of classifying individuals, even if those individuals are not explicitlypart of the ontology.

    15

  • 16 CHAPTER 3. ONTOLOGY COMPONENTS

    In formal extensional ontologies, only the utterances of words and numbers are considered individuals the numbersand names themselves are classes. In a 4D ontology, an individual is identied by its spatio-temporal extent. Examplesof formal extensional ontologies are ISO 15926 and the model in development by the IDEAS Group.

    3.3 ClassesMain article: Class (Knowledge representation)

    Classes concepts that are also called type, sort, category, and kind can be dened as an extension or an intension.According to an extensional denition, they are abstract groups, sets, or collections of objects. According to anintensional denition, they are abstract objects that are dened by values of aspects that are constraints for beingmember of the class. The rst denition of class results in ontologies in which a class is a subclass of collection.The second denition of class results in ontologies in which collections and classes are more fundamentally dierent.Classes may classify individuals, other classes, or a combination of both. Some examples of classes:[2]

    Person, the class of all people, or the abstract object that can be described by the criteria for being a person. Vehicle, the class of all vehicles, or the abstract object that can be described by the criteria for being a vehicle. Car, the class of all cars, or the abstract object that can be described by the criteria for being a car. Class, representing the class of all classes, or the abstract object that can be described by the criteria for beinga class.

    Thing, representing the class of all things, or the abstract object that can be described by the criteria for beinga thing (and not nothing).

    Ontologies vary on whether classes can contain other classes, whether a class can belong to itself, whether there is auniversal class (that is, a class containing everything), etc. Sometimes restrictions along these lines are made in orderto avoid certain well-known paradoxes.The classes of an ontology may be extensional or intensional in nature. A class is extensional if and only if it ischaracterized solely by its membership. More precisely, a class C is extensional if and only if for any class C', if C'has exactly the same members as C, then C and C' are identical. If a class does not satisfy this condition, then itis intensional. While extensional classes are more well-behaved and well-understood mathematically, as well as lessproblematic philosophically, they do not permit the ne grained distinctions that ontologies often need to make. Forexample, an ontology may want to distinguish between the class of all creatures with a kidney and the class of allcreatures with a heart, even if these classes happen to have exactly the same members. In most upper ontologies,the classes are dened intensionally. Intensionally dened classes usually have necessary conditions associated withmembership in each class. Some classes may also have sucient conditions, and in those cases the combination ofnecessary and sucient conditions make that class a fully dened class.Importantly, a class can subsume or be subsumed by other classes; a class subsumed by another is called a subclass(or subtype) of the subsuming class (or supertype). For example, Vehicle subsumes Car, since (necessarily) anythingthat is a member of the latter class is a member of the former. The subsumption relation is used to create a hierarchyof classes, typically with a maximally general class like Anything at the top, and very specic classes like 2002Ford Explorer at the bottom. The critically important consequence of the subsumption relation is the inheritance ofproperties from the parent (subsuming) class to the child (subsumed) class. Thus, anything that is necessarily true ofa parent class is also necessarily true of all of its subsumed child classes. In some ontologies, a class is only allowedto have one parent (single inheritance), but in most ontologies, classes are allowed to have any number of parents(multiple inheritance), and in the latter case all necessary properties of each parent are inherited by the subsumedchild class. Thus a particular class of animal (HouseCat) may be a child of the class Cat and also a child of the classPet.A partition is a set of related classes and associated rules that allow objects to be classied by the appropriate subclass.The rules correspond with the aspect values that distinguish the subclasses from the superclasses. For example, tothe right is the partial diagram of an ontology that has a partition of the Car class into the classes 2-Wheel Drive Carand 4-Wheel Drive Car. The partition rule (or subsumption rule) determines if a particular car is classied by the2-Wheel Drive Car or the 4-Wheel Drive Car class.

  • 3.4. ATTRIBUTES 17

    drive drive

    A partial ontology; The class Car has as subsumed classes 2-Wheel Drive Car and 4-Wheel Drive Car

    If the partition rule(s) guarantee that a single Car cannot be in both classes, then the partition is called a disjointpartition. If the partition rules ensure that every concrete object in the super-class is an instance of at least one of thepartition classes, then the partition is called an exhaustive partition.

    3.4 AttributesObjects in an ontology can be described by relating them to other things, typically aspects or parts. These relatedthings are often called attributes, although they may be independent things. Each attribute can be a class or anindividual. The kind of object and the kind of attribute determine the kind of relation between them. A relationbetween an object and an attribute express a fact that is specic to the object to which it is related. For example theFord Explorer object has attributes such as:

    Ford Explorer

    door (with as minimum and maximum cardinality: 4)

    {4.0L engine, 4.6L engine}

    6-speed transmission

    The value of an attribute can be a complex data type; in this example, the related engine can only be one of a list ofsubtypes of engines, not just a single thing.Ontologies are only true ontologies if concepts are related to other concepts (the concepts do have attributes). Ifthat is not the case, then you would have either a taxonomy (if hyponym relationships exist between concepts) or acontrolled vocabulary. These are useful, but are not considered true ontologies.

  • 18 CHAPTER 3. ONTOLOGY COMPONENTS

    3.5 RelationshipsRelationships (also known as relations) between objects in an ontology specify how objects are related to other objects.Typically a relation is of a particular type (or class) that species in what sense the object is related to the other objectin the ontology. For example in the ontology that contains the concept Ford Explorer and the concept Ford Broncomight be related by a relation of type . The full expression of that fact then becomes:

    Ford Explorer is dened as a successor of : Ford Bronco

    This tells us that the Explorer is the model that replaced the Bronco. This example also illustrates that the relationhas a direction of expression. The inverse expression expresses the same fact, but with a reverse phrase in naturallanguage.Much of the power of ontologies comes from the ability to describe relations. Together, the set of relations describesthe semantics of the domain. The set of used relation types (classes of relations) and their subsumption hierarchydescribe the expression power of the language in which the ontology is expressed.

    drive drive

    Ford Explorer is-a-subclass-of 4-Wheel Drive Car, which in turn is-a-subclass-of Car.

    An important type of relation is the subsumption relation (is-a-superclass-of, the converse of is-a, is-a-subtype-of oris-a-subclass-of). This denes which objects are classied by which class. For example we have already seen that theclass Ford Explorer is-a-subclass-of 4-Wheel Drive Car, which in turn is-a-subclass-of Car.The addition of the is-a-subclass-of relationships creates a taxonomy; a tree-like structure (or, more generally, apartially ordered set) that clearly depicts how objects relate to one another. In such a structure, each object is the'child' of a 'parent class (Some languages restrict the is-a-subclass-of relationship to one parent for all nodes, butmany do not).Another common type of relations is the mereology relation, written as part-of, that represents how objects combinetogether to form composite objects. For example, if we extended our example ontology to include concepts likeSteering Wheel, we would say that a Steering Wheel is-by-denition-a-part-of-a Ford Explorer since a steeringwheel is always one of the components of a Ford Explorer. If we introduce meronymy relationships to our ontology,

  • 3.6. REFERENCES 19

    the hierarchy that emerges is no longer able to be held in a simple tree-like structure since now members can appearunder more than one parent or branch. Instead this new structure that emerges is known as a directed acyclic graph.As well as the standard is-a-subclass-of and is-by-denition-a-part-of-a relations, ontologies often include additionaltypes of relations that further rene the semantics they model. Ontologies might distinguish between dierent cate-gories of relation types. For example:

    relation types for relations between classes relation types for relations between individuals relation types for relations between an individual and a class relation types for relations between a single object and a collection relation types for relations between collections

    Relation types are sometimes domain-specic and are then used to store specic kinds of facts or to answer particulartypes of questions. If the denitions of the relation types are included in an ontology, then the ontology denes itsown ontology denition language. An example of an ontology that denes its own relation types and distinguishesbetween various categories of relation types is the Gellish ontology.For example in the domain of automobiles, we might need a made-in type relationship which tells us where eachcar is built. So the Ford Explorer is made-in Louisville. The ontology may also know that Louisville is-located-inKentucky and Kentucky is-classied-as-a state and is-a-part-of the U.S.. Software using this ontology could nowanswer a question like which cars are made in the U.S.?"

    3.6 References[1] See Class (set theory), Class (computer science), and Class (philosophy), each of which is relevant but not identical to the

    notion of a class here.

    [2] Note that the names given to the classes mentioned here are entirely a matter of convention.

  • Chapter 4

    Property (philosophy)

    Determinate redirects here. For the biology term, see Determinate growth. For the song, see Determinate (song).

    In modern philosophy and mathematics, a property is a characteristic of an object; a red object is said to havethe property of redness. The property may be considered a form of object in its own right, able to possess otherproperties. A property however diers from individual objects in that it may be instantiated, and often in more thanone thing. It diers from the logical/mathematical concept of class by not having any concept of extensionality, andfrom the philosophical concept of class in that a property is considered to be distinct from the objects which possess it.Understanding how dierent individual entities (or particulars) can in some sense have some of the same propertiesis the basis of the problem of universals. The terms attribute and quality have similar meanings.

    4.1 Essential and accidental propertiesIn classical Aristotelian terminology, a property (Greek: idion, Latin: proprium) is one of the predicables. It is anon-essential quality of a species (like an accident), but a quality which is nevertheless characteristically present inmembers of that species (and in no others). For example, ability to laugh may be considered a special characteristicof human beings. However, laughter is not an essential quality of the species human, whose Aristotelian denitionof rational animal does not require laughter. Thus, in the classical framework, properties are characteristic, butnon-essential, qualities.

    4.2 Determinate and determinable propertiesA property may be classied as either determinate or determinable. A determinable property is one that can get morespecic. For example, color is a determinable property because it can be restricted to redness, blueness, etc.[1] Adeterminate property is one that cannot become more specic. This distinction may be useful in dealing with issuesof identity.[2]

    4.3 Lovely and suspect qualitiesDaniel Dennett distinguishes between lovely properties (such as loveliness itself), which, although they require anobserver to be recognised, exist latently in perceivable objects; and suspect properties which have no existence at alluntil attributed by an observer (such as being a suspect in a murder enquiry)[3]

    4.4 Property dualismMain article: Property dualismProperty dualism describes a category of positions in the philosophy of mind which hold that, although the world is

    20

  • 4.5. PROPERTIES IN MATHEMATICS 21

    Property dualism: the exemplication of two kinds of property by one kind of substance

    constituted of just one kind of substancethe physical kindthere exist two distinct kinds of properties: physicalproperties and mental properties. In other words, it is the view that non-physical, mental properties (such as beliefs,desires and emotions) inhere in some physical substances (namely brains).

    4.5 Properties in mathematicsIn mathematical terminology, a property p dened for all elements of a set X is usually dened as a function p: X {true, false}, that is true whenever the property holds; or equivalently, as the subset of X for which p holds; i.e. theset {x| p(x) = true}; p is its indicator function. It may be objected (see above) that this denes merely the extensionof a property, and says nothing about what causes the property to hold for exactly those values.

    4.6 Properties and predicatesThe ontological fact that something has a property is typically represented in language by applying a predicate to asubject. However, taking any grammatical predicate whatsoever to be a property, or to have a corresponding property,leads to certain diculties, such as Russells paradox and the GrellingNelson paradox. Moreover, a real property canimply a host of true predicates: for instance, if X has the property of weighing more than 2 kilos, then the predicates"..weighs more than 1.9 kilos, "..weighs more than 1.8 kilos, etc., are all true of it. Other predicates, such as isan individual, or has some properties are uninformative or vacuous. There is some resistance to regarding suchso-called Cambridge properties as legitimate.[4]

  • 22 CHAPTER 4. PROPERTY (PHILOSOPHY)

    4.7 Intrinsic and extrinsic propertiesMain article: Intrinsic and extrinsic properties (philosophy)

    An intrinsic property is a property that an object or a thing has of itself, independently of other things, including itscontext. An extrinsic (or relational) property is a property that depends on a things relationship with other things.For example, mass is a physical intrinsic property of any physical object, whereas weight is an extrinsic property thatvaries depending on the strength of the gravitational eld in which the respective object is placed.

    4.8 RelationsA relation is often considered to be a more general case of a property. Relations are true of several particulars, orshared amongst them. Thus the relation ".. is taller than .. holds between two individuals, who would occupy thetwo ellipses ('..'). Relations can be expressed by N-place predicates, where N is greater than 1.It is widely accepted that there are at least some apparent relational properties which are merely derived from non-relational (or 1-place) properties. For instance A is heavier than B is a relational predicate, but it is derived fromthe two non relational properties: the mass of A and the mass of B. Such relations are called external relations, asopposed to the more genuine internal relations.[5] Some philosophers believe that all relations are external, leading toa scepticism about relations in general, on the basis that external relations have no fundamental existence.

    4.9 See also Abstraction Doctrine of internal relations Identity of indiscernibles (AKA Leibniz's law) Intension Unary relation

    4.10 References[1] Stanford Encyclopaedia of Philosophy Determinate and Determinable Properties

    [2] Georges Dicker (Routledge). Humes Epistemology & Metaphysics. 1998. p. 31. Check date values in: |date= (help);

    [3] Lovely and Suspect Qualities

    [4] "... the distinguishing mark of Cambridge properties is precisely that they add nothing to individuals.

    [5] George Moore, External and Internal Relations

    4.11 External links Properties entry by Chris Swoyer, Francesco Orilia in the Stanford Encyclopedia of Philosophy

    This article incorporates material from property on PlanetMath, which is licensed under the Creative Commons Attribution/Share-Alike License.

  • Chapter 5

    Relation of Ideas

    In philosophy, a relation is a type of fact that is true or false of two things. For instance, being taller than is arelation that is true of Shaquille O'Neal and Ross Perot and false of the Empire State building and Mt. Everest.Substances or things have properties (this spot is red). Relations on the other hand obtain between two substances(this spot is bigger than that spot) or two properties (this red is a darker shade than that red).There are two major kinds of relations.:[1] ontological and epistemological. Ontological relations are entities likefather, which is a person considered in his relation to a child. Epistemological relations are often logical connectionsthat obtain between two concepts or ideas, like entailment. The fact that all men are mortal and that Socrates isa man entails that Socrates is mortalthe relation between Socrates mortality and the mortality of all men is anentailment relation.Relations in Modern PhilosophyRelation of Ideas, in the Humean sense, is the type of knowledge that can be characterized as arising out of pureconceptual thought and logical operations (in contrast to a Matter of Fact). For instance, in mathematics: 8 x 10 =80. Or in Logic: All islands are surrounded by water (by denition).In Kantian philosophy, a relation is equivalent to the analytic a priori. Unlike Hume, Kant denied that mathematicaltruths were analytic.[2] Rather, 'a bachelor is unmarried' is true by relation of the denitions of the concepts of'bachelor' and 'unmarried.'In Leibniz, relations of ideas are also similar to the so-called Truths of Reason, which are dened as those statementswhose denials are self-contradictory.

    5.1 References[1] J.P. Moreland, Body and Soul, p.?

    [2] Immanuel Kant, Critique of Pure Reason, Chapter 1?

    23

  • Chapter 6

    Relational algebra

    Not to be confused with Relation algebra.

    Relational algebra, rst described by E.F. Codd while at IBM, is a family of algebra with a well-founded semanticsused for modelling the data stored in relational databases, and dening queries on it.The main application of relational algebra is providing a theoretical foundation for relational databases, particularlyquery languages for such databases, chief among which is SQL.

    6.1 IntroductionRelational algebra received little attention outside of pure mathematics until the publication of E.F. Codd's relationalmodel of data in 1970. Codd proposed such an algebra as a basis for database query languages. (See sectionImplementations.)Five primitive operators of Codds algebra are the selection, the projection, the Cartesian product (also called the crossproduct or cross join), the set union, and the set dierence.

    6.1.1 Set operators

    The relational algebra uses set union, set dierence, and Cartesian product from set theory, but adds additionalconstraints to these operators.For set union and set dierence, the two relations involved must be union-compatiblethat is, the two relations musthave the same set of attributes. Because set intersection can be dened in terms of set dierence, the two relationsinvolved in set intersection must also be union-compatible.For the Cartesian product to be dened, the two relations involved must have disjoint headersthat is, they must nothave a common attribute name.In addition, the Cartesian product is dened dierently from the one in set theory in the sense that tuples are consideredto be shallow for the purposes of the operation. That is, the Cartesian product of a set of n-tuples with a set ofm-tuples yields a set of attened (n + m)-tuples (whereas basic set theory would have prescribed a set of 2-tuples,each containing an n-tuple and an m-tuple). More formally, R S is dened as follows:R S := f(r1; r2; : : : ; rn; s1; s2; : : : ; sm)j(r1; r2; : : : ; rn) 2 R; (s1; s2; : : : ; sm) 2 SgThe cardinality of the Cartesian product is the product of the cardinalities of its factors, i.e., |R S| = |R| |S|.

    6.1.2 Projection ()

    Main article: Projection (relational algebra)

    24

  • 6.2. JOINS AND JOIN-LIKE OPERATORS 25

    A projection is a unary operation written as a1;:::;an(R) where a1; : : : ; an is a set of attribute names. The resultof such projection is dened as the set that is obtained when all tuples in R are restricted to the set fa1; : : : ; ang .This species the specic subset of columns (attributes of each tuple) to be retrieved. To obtain the names andphone numbers from an address book, the projection might be written contactPhoneNumber contactName,(addressBook) .The result of that projection would be a relation which contains only the contactName and contactPhoneNumberattributes for each unique entry in addressBook.

    6.1.3 Selection ()

    Main article: Selection (relational algebra)

    A generalized selection is a unary operation written as '(R) where ' is a propositional formula that consists ofatoms as allowed in the normal selection and the logical operators ^ (and), _ (or) and : (negation). This selectionselects all those tuples in R for which ' holds.To obtain a listing of all friends or business associates in an address book, the selectionmight bewritten astrue = isFriend_true = isBusinessContact(addressBook). The result would be a relation containing every attribute of every unique record where isFriend is true or whereisBusinessContact is true.In Codds 1970 paper, selection is called restriction.[1]

    6.1.4 Rename ()

    Main article: Rename (relational algebra)

    A rename is a unary operation written as a/b(R) where the result is identical to R except that the b attribute in alltuples is renamed to an a attribute. This is simply used to rename the attribute of a relation or the relation itself.To rename the 'isFriend' attribute to 'isBusinessContact' in a relation, isFriend / isBusinessContact(addressBook) might beused.

    6.2 Joins and join-like operators

    6.2.1 Natural join ()

    Natural join redirects here. For the SQL implementation, see Natural join (SQL).

    Natural join ( ./ ) is a binary operator that is written as (R ./ S) where R and S are relations.[2] The result of thenatural join is the set of all combinations of tuples in R and S that are equal on their common attribute names. Foran example consider the tables Employee and Dept and their natural join:This can also be used to dene composition of relations. For example, the composition of Employee and Dept is theirjoin as shown above, projected on all but the common attribute DeptName. In category theory, the join is preciselythe ber product.The natural join is arguably one of the most important operators since it is the relational counterpart of logical AND.Note carefully that if the same variable appears in each of two predicates that are connected byAND, then that variablestands for the same thing and both appearances must always be substituted by the same value. In particular, naturaljoin allows the combination of relations that are associated by a foreign key. For example, in the above example aforeign key probably holds from Employee.DeptName to Dept.DeptName and then the natural join of Employee andDept combines all employees with their departments. Note that this works because the foreign key holds betweenattributes with the same name. If this is not the case such as in the foreign key from Dept.manager to Employee.Namethen we have to rename these columns before we take the natural join. Such a join is sometimes also referred to asan equijoin (see -join).More formally the semantics of the natural join are dened as follows:

  • 26 CHAPTER 6. RELATIONAL ALGEBRA

    R ./ S = ft [ s j t 2 R ^ s 2 S ^ Fun(t [ s)g

    where Fun is a predicate that is true for a relation r i it is also true for relation s. It is usually required that R and Smust have at least one common attribute, but if this constraint is omitted, and R and S have no common attributes,then the natural join becomes exactly the Cartesian product.The natural join can be simulated with Codds primitives as follows. Assume that c1,...,cm are the attribute namescommon to R and S, r1,...,rn are the attribute names unique to R and s1,...,sk are the attribute unique to S. Furthermoreassume that the attribute names x1,...,xm are neither in R nor in S. In a rst step we can now rename the commonattribute names in S:

    T = x1/c1;:::;xm/cm(S) = x1/c1(x2/c2(: : : xm/cm(S) : : :))

    Then we take the Cartesian product and select the tuples that are to be joined:

    P = c1=x1;:::;cm=xm(R T ) = c1=x1(c2=x2(: : : cm=xm(R T ) : : :))

    Finally we take a projection to get rid of the renamed attributes:

    U = r1;:::;rn;c1;:::;cm;s1;:::;sk(P )

    6.2.2 -join and equijoinConsider tables Car and Boat which list models of cars and boats and their respective prices. Suppose a customerwants to buy a car and a boat, but she does not want to spend more money for the boat than for the car. The -join( ./ ) on the relation CarPrice BoatPrice produces a table with all the possible options. When using a conditionwhere the attributes are equal, for example Price, then the condition may be specied as Price=Price or alternatively(Price) itself.If we want to combine tuples from two relations where the combination condition is not simply the equality of sharedattributes then it is convenient to have a more general form of join operator, which is the -join (or theta-join). The-join is a binary operator that is written as R ./ S

    a bor R ./ S

    a vwhere a and b are attribute names, is a binary

    relational operator in the set {, }, v is a value constant, and R and S are relations. The result of thisoperation consists of all combinations of tuples in R and S that satisfy . The result of the -join is dened only ifthe headers of S and R are disjoint, that is, do not contain a common attribute.The simulation of this operation in the fundamental operations is therefore as follows:

    R ./ S = (R S)

    In case the operator is the equality operator (=) then this join is also called an equijoin.Note, however, that a computer language that supports the natural join and rename operators does not need -joinas well, as this can be achieved by selection from the result of a natural join (which degenerates to Cartesian productwhen there are no shared attributes).

    6.2.3 Semijoin ()()The left semijoin is joining similar to the natural join and written as R n S where R and S are relations.[3] The resultof this semijoin is the set of all tuples in R for which there is a tuple in S that is equal on their common attributenames. For an example consider the tables Employee and Dept and their semi join:More formally the semantics of the semijoin can be dened as follows:

  • 6.2. JOINS AND JOIN-LIKE OPERATORS 27

    R n S = { t : t 2 R ^ 9 s 2 S(Fun (t [ s)) }

    where Fun(r) is as in the denition of natural join.The semijoin can be simulated using the natural join as follows. If a1, ..., an are the attribute names of R, then

    R n S = a1,..,an(R ./ S).

    Since we can simulate the natural join with the basic operators it follows that this also holds for the semijoin.

    6.2.4 Antijoin ()

    The antijoin, written as R . S where R and S are relations, is similar to the semijoin, but the result of an antijoin isonly those tuples in R for which there is no tuple in S that is equal on their common attribute names.[4]

    For an example consider the tables Employee and Dept and their antijoin:The antijoin is formally dened as follows:

    R . S = { t : t 2 R ^ :9 s 2 S(Fun (t [ s)) }

    or

    R . S = { t : t 2 R, there is no tuple s of S that satises Fun (t [ s) }

    where Fun (t [ s) is as in the denition of natural join.The antijoin can also be dened as the complement of the semijoin, as follows:

    R . S = R R n S

    Given this, the antijoin is sometimes called the anti-semijoin, and the antijoin operator is sometimes written assemijoin symbol with a bar above it, instead of . .

    6.2.5 Division ()

    The division is a binary operation that is written as R S. The result consists of the restrictions of tuples in R tothe attribute names unique to R, i.e., in the header of R but not in the header of S, for which it holds that all theircombinations with tuples in S are present in R. For an example see the tables Completed, DBProject and their division:If DBProject contains all the tasks of the Database project, then the result of the division above contains exactly thestudents who have completed both of the tasks in the Database project.More formally the semantics of the division is dened as follows:

    R S = { t[a1,...,an] : t 2 R ^ 8 s 2 S ( (t[a1,...,an] [ s) 2 R) }

    where {a1,...,an} is the set of attribute names unique to R and t[a1,...,an] is the restriction of t to this set. It is usuallyrequired that the attribute names in the header of S are a subset of those of R because otherwise the result of theoperation will always be empty.The simulation of the division with the basic operations is as follows. We assume that a1,...,an are the attribute namesunique to R and b1,...,bm are the attribute names of S. In the rst step we project R on its unique attribute names andconstruct all combinations with tuples in S:

    T := a1,...,an(R) S

  • 28 CHAPTER 6. RELATIONAL ALGEBRA

    In the prior example, T would represent a table such that every Student (because Student is the unique key / attributeof the Completed table) is combined with every given Task. So Eugene, for instance, would have two rows, Eugene-> Database1 and Eugene -> Database2 in T.In the next step we subtract R from T relation:

    U := T R

    Note that in U we have the possible combinations that could have been in R, but weren't. So if we now takethe projection on the attribute names unique to R then we have the restrictions of the tuples in R for which not allcombinations with tuples in S were present in R:

    V := a1,...,an(U)

    So what remains to be done is take the projection of R on its unique attribute names and subtract those in V :

    W := a1,...,an(R) V

    6.3 Common extensionsIn practice the classical relational algebra described above is extended with various operations such as outer joins,aggregate functions and even transitive closure.[5]

    6.3.1 Outer joinsMain article: Outer join

    Whereas the result of a join (or inner join) consists of tuples formed by combining matching tuples in the twooperands, an outer join contains those tuples and additionally some tuples formed by extending an unmatched tuplein one of the operands by ll values for each of the attributes of the other operand. Note that outer joins are notconsidered part of the classical relational algebra discussed so far.[6]

    The operators dened in this section assume the existence of a null value, , which we do not dene, to be used forthe ll values; in practice this corresponds to the NULL in SQL. In order to make subsequent selection operations onthe resulting table meaningful, a semantic meaning needs to be assigned to nulls; in Codds approach the propositionallogic used by the selection is extended to a three-valued logic, although we elide those details in this article.Three outer join operators are dened: left outer join, right outer join, and full outer join. (The word outer issometimes omitted.)

    Left outer join ()

    The left outer join is written as R S where R and S are relations.[7] The result of the left outer join is the set of allcombinations of tuples in R and S that are equal on their common attribute names, in addition (loosely speaking) totuples in R that have no matching tuples in S.For an example consider the tables Employee and Dept and their left outer join:In the resulting relation, tuples in S which have no common values in common attribute names with tuples in R takea null value, .Since there are no tuples in Dept with a DeptName of Finance or Executive, s occur in the resulting relation wheretuples in Employee have a DeptName of Finance or Executive.Let r1, r2, ..., rn be the attributes of the relation R and let {(, ..., )} be the singleton relation on the attributes thatare unique to the relation S (those that are not attributes of R). Then the left outer join can be described in terms ofthe natural join (and hence using basic operators) as follows:

    (R ./ S) [ ((R r1;r2;:::;rn(R ./ S)) f(!; : : : !)g)

  • 6.3. COMMON EXTENSIONS 29

    Right outer join ()

    The right outer join behaves almost identically to the left outer join, but the roles of the tables are switched.The right outer join of relations R and S is written as R S.[8] The result of the right outer join is the set of allcombinations of tuples in R and S that are equal on their common attribute names, in addition to tuples in S that haveno matching tuples in R.For example consider the tables Employee and Dept and their right outer join:In the resulting relation, tuples in R which have no common values in