Provenance Semirings

Total Page:16

File Type:pdf, Size:1020Kb

Provenance Semirings Provenance Semirings Todd J. Green Grigoris Karvounarakis Val Tannen [email protected] [email protected] [email protected] Department of Computer and Information Science University of Pennsylvania Philadelphia, PA 19104, USA ABSTRACT We observe that in all four cases, the calculations with an- We show that relational algebra calculations for incomplete notations are strikingly similar. This suggests looking for an databases, probabilistic databases, bag semantics and why- algebraic structure on annotations that captures the above provenance are particular cases of the same general algo- as particular cases. We propose using commutative semir- rithms involving semirings. This further suggests a com- ings for this purpose. In fact, we can show that the laws of prehensive provenance representation that uses semirings of commutative semirings are forced by certain expected iden- polynomials. We extend these considerations to datalog and tities in RA. Having identified commutative semirings as semirings of formal power series. We give algorithms for the right algebraic structure, we argue that a symbolic rep- datalog provenance calculation as well as datalog evaluation resentation of semiring calculations is just what is needed to for incomplete and probabilistic databases. Finally, we show record, document, and track RA querying from input to out- that for some semirings containment of conjunctive queries put for applications which require rich provenance informa- is the same as for standard set semantics. tion. It is a standard philosophy in algebra that such sym- bolic representations form the most general such structure. Categories and Subject Descriptors In the case of commutative semirings, just as for rings, the symbolic representation is that of polynomials. We therefore H.2.1 [Database Management]: Data Models propose to use polynomials to capture provenance. Next we General Terms look to extend our approach to recursive datalog queries. To achieve this we combine semirings with fixed point theory. Theory, Algorithms The contributions of the paper are as follows: Keywords • We introduce K-relations, in which tuples are anno- Data provenance, data lineage, incomplete databases, prob- tated (tagged) with elements from K. We define a gen- abilistic databases, semirings, datalog, formal power series eralized positive algebra on K-relations and argue that K must be a commutative semiring (Section 3). 1. INTRODUCTION • For provenance semirings we propose polynomials Several forms of annotated relations have appeared in var- with integer coefficients, and we show that positive ious contexts in the literature. Query answering in these algebra semantics for any commutative semirings fac- settings involves generalizing the relational algebra (RA) to tors through the provenance semantics (Section 4). perform corresponding operations on the annotations. The seminal paper in incomplete databases [19] gener- • We extend these results to datalog queries by consid- alized RA to c-tables, where relations are annotated with ering semirings with fixed points (Section 5). Boolean formulas. In probabilistic databases, [17] and [33] generalized RA to event tables, also a form of annotated • For the (possibly infinite) provenance in datalog query relations. In data warehousing, [12] and [13] compute lin- answers we propose semirings of formal power series eages for tuples in the output of queries, in effect general- that are shown to be generated by finite algebraic izing RA to computations on relations annotated with sets systems of fixed point equations (Section 6). of contributing tuples. Finally, RA on bag semantics can be • We give algorithms for deciding the finiteness of these viewed as a generalization to annotated relations, where a formal power series, for computing them when finite, tuple’s annotation is a number representing its multiplicity. and for computing the coefficient of an arbitrary mono- mial otherwise (Section 7). • We show how to specialize our algorithms for com- Permission to make digital or hard copies of all or part of this work for puting full datalog answers when K is a finite dis- personal or classroom use is granted without fee provided that copies are tributive lattice, in particular for incomplete and not made or distributed for profit or commercial advantage and that copies probabilistic databases (Section 8). bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific • We consider query containment wrt K-relation se- permission and/or a fee. PODS’07, June 11–14, 2007, Beijing, China. mantics and we show that for unions of conjunctive Copyright 2007 ACM 978-1-59593-685-1/07/0006 ...$5.00. queries and when K is a distributive lattice, query a b c a b c a c a c a b c ? a b c b1 a c (b1 ∧ b1) ∨ (b1 ∧ b1) a c b1 d b e ? d b e b2 a e b1 ∧ b2 a e b1 ∧ b2 f g e ? f g e b3 d c b1 ∧ b2 d c b1 ∧ b2 (a) (b) d e (b2 ∧ b2) ∨ (b2 ∧ b2) ∨ (b2 ∧ b3) d e b2 a c f e (b3 ∧ b3) ∨ (b3 ∧ b3) ∨ (b2 ∧ b3) f e b3 a c a e (a) (b) n a e d e a c o ∅, a c , d e , f e , , , , d c d c f e f e d e Figure 2: Result of Imielinski-Lipski computation d e f e (c) a c Figure 1: A maybe-table and a query result a b c a c 2 · 2 + 2 · 2 = 8 a b c 2 a e 2 · 5 = 10 d b e 5 d c 2 · 5 = 10 f g e 1 d e 5 · 5 + 5 · 5 + 5 · 1 = 55 containment is the same as that given by standard set f e 1 · 1 + 1 · 1 + 5 · 1 = 7 semantics. (Section 9). (a) (b) 2. QUERIES ON ANNOTATED RELATIONS Figure 3: Bag semantics example We motivate our study by considering three important ex- amples of query answering on annotated relations and high- light the similarities between them. The first example comes from the study of incomplete tions we do here for multisets, and the Boolean calculations databases, where a simple representation system is the maybe- for the c-table. table [30, 18], in which optional tuples are annotated with a A third example comes from the study of probabilistic ‘?’, as in the example of Figure 1(a). Such a table represents databases, where tuples are associated with values from [0, 1] a set of possible worlds, and the answer to a query over such which represent the probability that the tuple is present in a table is the set of instances obtained by evaluating the the database. Answering queries over probabilistic tables re- query over each possible world. Thus, given a query like quires computing the correct probabilities for tuples in the output. To do this, Fuhr and R¨ollecke [17] and Zim´anyi [33] def ` ´ q(R) = πac πabR 1 πbcR ∪ πacR 1 πbcR introduced event tables, where tuples are annotated with probabilistic events, and they gave a query answering algo- the query result is the set of possible worlds shown in Fig- rithm for computing the events associated with tuples in the ure 1(c). Unfortunately, this set of possible worlds cannot query output.1 itself be represented by a maybe-table, intuitively because Figure 4(a) shows an example of an event table with as- whenever the tuples (a, e) and (d, c) appear, then so do (a, c) sociated event probabilities (e.g., x represents the event that and (d, e), and maybe-tables cannot represent such a depen- (a, b, c) appears in the instance, and x, y, z are assumed in- dency. dependent). Considering again the same query q as above, To overcome such limitations, Imielinski and Lipski [19] the Fuhr-R¨olleke-Zim´anyi query answering algorithm pro- introduced c-tables, where tuples are annotated with Boolean duces the event table shown in Figure 4(b). Note again the formulas called conditions. A maybe-table is a simple kind similarity between this table and the example earlier with c- of c-table, where the annotations are distinct Boolean vari- tables. The probabilities of tuples in the output of the query ables, as shown in Figure 1(b). In contrast to weaker rep- can be computed from this table using the independence of resentation systems, c-tables are expressive enough to be x and y. closed under RA queries, and the main result of [19] is an algorithm for answering RA queries on c-tables, producing another c-table as a result. On our example, this algorithm 3. POSITIVE RELATIONAL ALGEBRA produces the c-table shown in Figure 2(a), which can be In this section we attempt to unify the examples above simplified to the c-table shown in Figure 2(b); this c-table by considering generalized relations in which the tuples are represents exactly the set of possible worlds shown in Fig- annotated (tagged) with information of various kinds. Then, ure 1(c). we will define a generalization of the positive relational al- Another kind of table with annotations is a multiset or bag. gebra (RA+) to such tagged-tuple relations. The examples In this case, the annotations are natural numbers which rep- in Section 2 will turn out to be particular cases. resent the multiplicity of the tuple in the multiset. (A tuple We use here the named perspective [1] of the relational not listed in the table has multiplicity 0.) Query answering model in which tuples are functions t : U → D with U a on such tables involves calculating not just the tuples in the finite set of attributes and D a domain of values. We fix output, but also their multiplicities.
Recommended publications
  • Chapter 1 Logic and Set Theory
    Chapter 1 Logic and Set Theory To criticize mathematics for its abstraction is to miss the point entirely. Abstraction is what makes mathematics work. If you concentrate too closely on too limited an application of a mathematical idea, you rob the mathematician of his most important tools: analogy, generality, and simplicity. – Ian Stewart Does God play dice? The mathematics of chaos In mathematics, a proof is a demonstration that, assuming certain axioms, some statement is necessarily true. That is, a proof is a logical argument, not an empir- ical one. One must demonstrate that a proposition is true in all cases before it is considered a theorem of mathematics. An unproven proposition for which there is some sort of empirical evidence is known as a conjecture. Mathematical logic is the framework upon which rigorous proofs are built. It is the study of the principles and criteria of valid inference and demonstrations. Logicians have analyzed set theory in great details, formulating a collection of axioms that affords a broad enough and strong enough foundation to mathematical reasoning. The standard form of axiomatic set theory is denoted ZFC and it consists of the Zermelo-Fraenkel (ZF) axioms combined with the axiom of choice (C). Each of the axioms included in this theory expresses a property of sets that is widely accepted by mathematicians. It is unfortunately true that careless use of set theory can lead to contradictions. Avoiding such contradictions was one of the original motivations for the axiomatization of set theory. 1 2 CHAPTER 1. LOGIC AND SET THEORY A rigorous analysis of set theory belongs to the foundations of mathematics and mathematical logic.
    [Show full text]
  • Mereology Then and Now
    Logic and Logical Philosophy Volume 24 (2015), 409–427 DOI: 10.12775/LLP.2015.024 Rafał Gruszczyński Achille C. Varzi MEREOLOGY THEN AND NOW Abstract. This paper offers a critical reconstruction of the motivations that led to the development of mereology as we know it today, along with a brief description of some questions that define current research in the field. Keywords: mereology; parthood; formal ontology; foundations of mathe- matics 1. Introduction Understood as a general theory of parts and wholes, mereology has a long history that can be traced back to the early days of philosophy. As a formal theory of the part-whole relation or rather, as a theory of the relations of part to whole and of part to part within a whole it is relatively recent and came to us mainly through the writings of Edmund Husserl and Stanisław Leśniewski. The former were part of a larger project aimed at the development of a general framework for formal ontology; the latter were inspired by a desire to provide a nominalistically acceptable alternative to set theory as a foundation for mathematics. (The name itself, ‘mereology’ after the Greek word ‘µρoς’, ‘part’ was coined by Leśniewski [31].) As it turns out, both sorts of motivation failed to quite live up to expectations. Yet mereology survived as a theory in its own right and continued to flourish, often in unexpected ways. Indeed, it is not an exaggeration to say that today mereology is a central and powerful area of research in philosophy and philosophical logic. It may be helpful, therefore, to take stock and reconsider its origins.
    [Show full text]
  • 06. Naive Set Theory I
    Topics 06. Naive Set Theory I. Sets and Paradoxes of the Infinitely Big II. Naive Set Theory I. Sets and Paradoxes of the Infinitely Big III. Cantor and Diagonal Arguments Recall: Paradox of the Even Numbers Claim: There are just as many even natural numbers as natural numbers natural numbers = non-negative whole numbers (0, 1, 2, ..) Proof: { 0 , 1 , 2 , 3 , 4 , ............ , n , ..........} { 0 , 2 , 4 , 6 , 8 , ............ , 2n , ..........} In general: 2 criteria for comparing sizes of sets: (1) Correlation criterion: Can members of one set be paired with members of the other? (2) Subset criterion: Do members of one set belong to the other? Can now say: (a) There are as many even naturals as naturals in the correlation sense. (b) There are less even naturals than naturals in the subset sense. To talk about the infinitely Moral: notion of sets big, just need to be clear makes this clear about what’s meant by size Bolzano (1781-1848) Promoted idea that notion of infinity was fundamentally set-theoretic: To say something is infinite is “God is infinite in knowledge” just to say there is some set means with infinite members “The set of truths known by God has infinitely many members” SO: Are there infinite sets? “a many thought of as a one” -Cantor Bolzano: Claim: The set of truths is infinite. Proof: Let p1 be a truth (ex: “Plato was Greek”) Let p2 be the truth “p1 is a truth”. Let p3 be the truth “p3 is a truth”. In general, let pn be the truth “pn-1 is a truth”, for any natural number n.
    [Show full text]
  • Math 127: Equivalence Relations
    Math 127: Equivalence Relations Mary Radcliffe 1 Equivalence Relations Relations can take many forms in mathematics. In these notes, we focus especially on equivalence relations, but there are many other types of relations (such as order relations) that exist. Definition 1. Let X; Y be sets. A relation R = R(x; y) is a logical formula for which x takes the range of X and y takes the range of Y , sometimes called a relation from X to Y . If R(x; y) is true, we say that x is related to y by R, and we write xRy to indicate that x is related to y by R. Example 1. Let f : X ! Y be a function. We can define a relation R by R(x; y) ≡ (f(x) = y). Example 2. Let X = Y = Z. We can define a relation R by R(a; b) ≡ ajb. There are many other examples at hand, such as ordering on R, multiples in Z, coprimality relationships, etc. The definition we have here is simply that a relation gives some way to connect two elements to each other, that can either be true or false. Of course, that's not a very useful thing, so let's add some conditions to make the relation carry more meaning. For this, we shall focus on relations from X to X, also called relations on X. There are several properties that will be interesting in considering relations: Definition 2. Let X be a set, and let ∼ be a relation on X. • We say that ∼ is reflexive if x ∼ x 8x 2 X.
    [Show full text]
  • Well-Orderings, Ordinals and Well-Founded Relations. an Ancient
    Well-orderings, ordinals and well-founded relations. An ancient principle of arithmetic, that if there is a non-negative integer with some property then there is a least such, is useful in two ways: as a source of proofs, which are then said to be \by induction" and as as a source of definitions, then said to be \by recursion." An early use of induction is in Euclid's proof that every integer > 2 is a product of primes, (where we take \prime" to mean \having no divisors other than itself and 1"): if some number is not, then let n¯ be the least counter-example. If not itself prime, it can be written as a product m1m2 of two strictly smaller numbers each > 2; but then each of those is a product of primes, by the minimality of n¯; putting those two products together expresses n¯ as a product of primes. Contradiction ! An example of definition by recursion: we set 0! = 1; (n + 1)! = n! × (n + 1): A function defined for all non-negative integers is thereby uniquely specified; in detail, we consider an attempt to be a function, defined on a finite initial segment of the non-negative integers, which agrees with the given definition as far as it goes; if some integer is not in the domain of any attempt, there will be a least such; it cannot be 0; if it is n + 1, the recursion equation tells us how to extend an attempt defined at n to one defined at n + 1. So no such failure exists; we check that if f and g are two attempts and both f(n) and g(n) are defined, then f(n) = g(n), by considering the least n where that might fail, and again reaching a contradiction; and so, there being no disagreement between any two attempts, the union of all attempts will be a well-defined function, which is familiar to us as the factorial function.
    [Show full text]
  • Relation Liftings on Preorders and Posets
    Relation Liftings on Preorders and Posets Marta B´ılkov´a1, Alexander Kurz2,, Daniela Petri¸san2,andJiˇr´ı Velebil3, 1 Faculty of Philosophy, Charles University, Prague, Czech Republic [email protected] 2 Department of Computer Science, University of Leicester, United Kingdom {kurz,petrisan}@mcs.le.ac.uk 3 Faculty of Electrical Engineering, Czech Technical University in Prague, Czech Republic [email protected] Abstract. The category Rel(Set) of sets and relations can be described as a category of spans and as the Kleisli category for the powerset monad. A set-functor can be lifted to a functor on Rel(Set) iff it preserves weak pullbacks. We show that these results extend to the enriched setting, if we replace sets by posets or preorders. Preservation of weak pullbacks becomes preservation of exact lax squares. As an application we present Moss’s coalgebraic over posets. 1 Introduction Relation lifting [Ba, CKW, HeJ] plays a crucial role in coalgebraic logic, see eg [Mo, Bal, V]. On the one hand, it is used to explain bisimulation: If T : Set −→ Set is a functor, then the largest bisimulation on a coalgebra ξ : X −→ TX is the largest fixed point of the operator (ξ × ξ)−1 ◦ T on relations on X,whereT is the lifting of T to Rel(Set) −→ Rel(Set). (The precise meaning of ‘lifting’ will be given in the Extension Theorem 5.3.) On the other hand, Moss’s coalgebraic logic [Mo] is given by adding to propo- sitional logic a modal operator ∇, the semantics of which is given by applying T to the forcing relation ⊆ X ×L,whereL is the set of formulas: If α ∈ T (L), then x ∇α ⇔ ξ(x) T () α.
    [Show full text]
  • Equivalence Relations ¡ Definition: a Relation on a Set Is Called an Equivalence Relation If It Is Reflexive, Symmetric, and Transitive
    Equivalence Relations ¡ Definition: A relation on a set is called an equivalence relation if it is reflexive, symmetric, and transitive. Recall the definitions: ¢ ¡ ¤ ¤ ¨ ¦ reflexive: £¥¤ §©¨ for all . ¢ ¡ ¤ ¤ ¨ ¨ ¦ ¦ ¦ £ § symmetric: £¥¤ §©¨ when , for . ¢ ¤ ¤ ¨ ¨ ¦ ¦ ¦ £ § transitive: £ §©¨ and £ § implies , ¡ ¤ ¨ for ¦ ¦ . If two elements are related by an equivalence relation, they are said to be equivalent. 1 Examples 1. Let be the relation on the set of English words such that if and only if starts with the same letter as . Then is an equivalence relation. 2. Let be the relation on the set of all human beings such that if and only if was born in the same country as . Then is an equivalence relation. 3. Let be the relation on the set of all human beings such that if and only if owns the same color car as . Then is an not equivalence relation. 2 ¤ Pr is Let ¢ ¢ an oof: is If Since Thus, equi ¤ symmetric. is By refle v ¤ alence definition, be , Congruence for xi ¤ a ¤ v positi e. some relation. £ , ¤ v then e inte £ ¤ § inte ¦ ¤ ger , § , and ger we ¤ 3 . we ha Then Modulo Using v e ha if that v the and , e this,we for ¤ relation only some ¤ ¤ proceed: if inte ger , , so and . Therefore, ¢ ¤ and If ¤ ¤ we congruence ha v e £ ¤ ¤ and , and §"! modulo £ 4 , § and , for is an inte ! is equi , then gers transiti v alence we and v £ ha e. ! v relation e . Thus, § ¦ ¡ Definition: Let be an equivalence relation on a set . The equivalence class of¤ is ¤ ¤ ¨ % ¦ £ § # $ '& ¤ % In words, # $ is the set of all elements that are related to the ¡ ¤ element ¨ .
    [Show full text]
  • On the Necessary Use of Abstract Set Theory
    ADVANCES IN MATHEMATICS 41, 209-280 (1981) On the Necessary Use of Abstract Set Theory HARVEY FRIEDMAN* Department of Mathematics, Ohio State University, Columbus, Ohio 43210 In this paper we present some independence results from the Zermelo-Frankel axioms of set theory with the axiom of choice (ZFC) which differ from earlier such independence results in three major respects. Firstly, these new propositions that are shown to be independent of ZFC (i.e., neither provable nor refutable from ZFC) form mathematically natural assertions about Bore1 functions of several variables from the Hilbert cube I” into the unit interval, or back into the Hilbert cube. As such, they are of a level of abstraction significantly below that of the earlier independence results. Secondly, these propositions are not only independent of ZFC, but also of ZFC together with the axiom of constructibility (V = L). The only earlier examples of intelligible statements independent of ZFC + V= L either express properties of formal systems such as ZFC (e.g., the consistency of ZFC), or assert the existence of very large cardinalities (e.g., inaccessible cardinals). The great bulk of independence results from ZFCLthe ones that involve standard mathematical concepts and constructions-are about sets of limited cardinality (most commonly, that of at most the continuum), and are obtained using the forcing method introduced by Paul J. Cohen (see [2]). It is now known in virtually every such case, that these independence results are eliminated if V= L is added to ZFC. Finally, some of our propositions can be proved in the theory of classes, as formalized by the Morse-Kelley class theory with the axiom of choice for sets (MKC), but not in ZFC.
    [Show full text]
  • Chapter 8 Ordered Sets
    Chapter VIII Ordered Sets, Ordinals and Transfinite Methods 1. Introduction In this chapter, we will look at certain kinds of ordered sets. If a set \ is ordered in a reasonable way, then there is a natural way to define an “order topology” on \. Most interesting (for our purposes) will be ordered sets that satisfy a very strong ordering condition: that every nonempty subset contains a smallest element. Such sets are called well-ordered. The most familiar example of a well-ordered set is and it is the well-ordering property that lets us do mathematical induction in In this chapter we will see “longer” well ordered sets and these will give us a new proof method called “transfinite induction.” But we begin with something simpler. 2. Partially Ordered Sets Recall that a relation V\ on a set is a subset of \‚\ (see Definition I.5.2 ). If ÐBßCÑ−V, we write BVCÞ An “order” on a set \ is refers to a relation on \ that satisfies some additional conditions. Order relations are usually denoted by symbols such asŸ¡ß£ , , or . Definition 2.1 A relation V\ on is called: transitive ifÀ a +ß ,ß - − \ Ð+V, and ,V-Ñ Ê +V-Þ reflexive ifÀa+−\+V+ antisymmetric ifÀ a +ß , − \ Ð+V, and ,V+ Ñ Ê Ð+ œ ,Ñ symmetric ifÀ a +ß , − \ +V, Í ,V+ (that is, the set V is “symmetric” with respect to thediagonal ? œÖÐBßBÑÀB−\ש\‚\). Example 2.2 1) The relation “œ\ ” on a set is transitive, reflexive, symmetric, and antisymmetric. Viewed as a subset of \‚\, the relation “ œ ” is the diagonal set ? œÖÐBßBÑÀB−\×Þ 2) In ‘, the usual order relation is transitive and antisymmetric, but not reflexive or symmetric.
    [Show full text]
  • Partial Order Relations
    Partial Order Relations We defined three properties of relations: reflexivity, symmetry and transitivity. A fourth property of relations is anti-symmetry. Definition of Antisymmetry:: Let R be a relation on a set A, R is antisymmetric if , and only if, for all a and b in A, if a R b and b R a then a=b. Testing for Antisymmetry of finite Relations: Let R1 and R2 be the relations on {0, 1, 2} defined as follows: a- R1= { (0,2 ), (1, 2), (2, 0)} b- R2 = { (0,0), (0, 1), (0, 2), (1, 1), (1, 2)} Draw a directed graph for R1 and R2 and indicate which relation is antisymmetric? a- R1 is not antisymmetric b- R2 is antisymmetric Testing for Antisymmetry of “Divides” relations. Let R1 be the “divides” relation on the set of all positive integers, and let R2 be the “divides” relation on the set of all integers. + For all a, b ∈ Z , a R1 b ⇔ a | b For all a, b ∈ Z, a R2 b ⇔ a | b a- Is R1 antisymmetric ? Prove or give a counterexample b- Is R2 antisymmetric ? Prove or give a counter example. Solution: -R1 is antisymmetric -R2 is not antisymmetric Partial Order Relations: Let R be a binary relation defined on a set A. R is a partial order relation if, and only if, R is reflexive, antisymmetric and transitive. Two fundamental partial order relations are the “less than or equal to” relation on a set of real numbers and the “subset” relation on a set of sets. The “Subset” Relation: Let A be any collection of sets and define the subset relation ⊆ on A as follows: For all U, V ∈ A U ⊆ V ⇔ for all x, if x ∈ U then x ∈ V.
    [Show full text]
  • Set Theory, Relations, and Functions (II)
    LING 106. Knowledge of Meaning Lecture 2-2 Yimei Xiang Feb 1, 2017 Set theory, relations, and functions (II) Review: set theory – Principle of Extensionality – Special sets: singleton set, empty set – Ways to define a set: list notation, predicate notation, recursive rules – Relations of sets: identity, subset, powerset – Operations on sets: union, intersection, difference, complement – Venn diagram – Applications in natural language semantics: (i) categories denoting sets of individuals: common nouns, predicative ADJ, VPs, IV; (ii) quantificational determiners denote relations of sets 1 Relations 1.1 Ordered pairs and Cartesian products • The elements of a set are not ordered. To describe functions and relations we will need the notion of an ordered pair, written as xa; by, where a is the first element of the pair and b is the second. Compare: If a ‰ b, then ... ta; bu “ tb; au, but xa; by ‰ xb; ay ta; au “ ta; a; au, but xa; ay ‰ xa; a; ay • The Cartesian product of two sets A and B (written as A ˆ B) is the set of ordered pairs which take an element of A as the first member and an element of B as the second member. (1) A ˆ B “ txx; yy | x P A and y P Bu E.g. Let A “ t1; 2u, B “ ta; bu, then A ˆ B “ tx1; ay; x1; by; x2; ay; x2; byu, B ˆ A “ txa; 1y; xa; 2y; xb; 1y; xb; 2yu 1.2 Relations, domain, and range •A relation is a set of ordered pairs. For example: – Relations in math: =, ¡, ‰, ... – Relations in natural languages: the instructor of, the capital city of, ..
    [Show full text]
  • Lecture 2: Well-Orderings January 21, 2009
    Lecture 2: Well-orderings January 21, 2009 3 Well-orderings Definition 3.1. A binary relation r on a set A is a subset of A × A. We also define dom(r) = { x | ∃y.(x, y) ∈ r }, rng(r) = { y | ∃x.(x, y) ∈ r }, and fld(r) = dom(r) ∪ rng(r). Definition 3.2. A binary relation r is a strict partial order iff • ∀x.(x, x) 6∈ r, and • ∀xyz. if (x, y) ∈ r and (y, z) ∈ r then (x, z) ∈ r, that is, if r is irreflexive and transitive. Moreover, iff for all x and y in fld(r), either (x, y) ∈ r or (y, x) ∈ r or x = y, we say r is a strict linear order. Definition 3.3. A strict linear order r is a well-ordering iff every non-empty z ⊆ fld(r) has an r-least member. Remark. For example, the natural numbers N are well-ordered under the normal < relation. However, Z, Q, and Q+ are not. However, we want to be able to talk about well-orderings longer than ω. For example, 0, 2, 4,..., 1, 3, 5,... is an alternative well-ordering of the natural numbers which is longer than ω. Definition 3.4. f : X → X is order-preserving iff for all y, z ∈ X, y < z implies that f(y) < f(z). Theorem 3.5. If hX, <i is a well-ordering and f is order-preserving, then for every y ∈ X, y ≤ f(y). Proof. Suppose otherwise, namely, that there exists some z ∈ X for which f(z) < z.
    [Show full text]