1 / 40

Lesson 1 5 : Rela tions a nd algebr as

Lesson 1 5 : Rela tions a nd algebr as. Mathematical Logic ;. Contents. Theory of sets Relations and mappings Relation Binary relation on a set Mapping Partition & equivalence Orderings Algebras Algebras with one operation Algebras with two operations Lattices. Theory of sets.

brentkelly
Download Presentation

Lesson 1 5 : Rela tions a nd algebr as

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lesson 15:Relations and algebras Mathematical Logic;

  2. Contents • Theory of sets • Relations and mappings • Relation • Binary relation on a set • Mapping • Partition & equivalence • Orderings • Algebras • Algebras with one operation • Algebras with two operations • Lattices Relations and algebras

  3. Theory of sets • Language: • Special symbols: • Binary predicates:  (is an element of),  (is a proper subset of),  (is a subset of) • Binary function symbols: (intersection),  (union) • Cantor – naive set theory (without axiomatizing) • Nowadays there are many formal axiomatizations, but none of them is complete. • Examples: von Neumann-Bernays-Gödel, Zermelo-Fränkel + axiom of choice Relations and algebras

  4. Naive theory of sets • Ø – an empty set • Cardinality of a set A: |A| Relations between sets (axioms): • Equality • Inclusion (being a subset) Relations and algebras

  5. Naive theory of sets – set theoretical operations • Intersection • Union • Difference • Symetrical difference • Complement with respect to universe U Relations and algebras

  6. Naive theory of sets – set theoretical operations • Power set • Cartesian product • Cartesian power A1=A, A0={Ø} n Relations and algebras

  7. Zermelo-Fränkel set-theory Axiom of extensionality: Two sets are identical if and only if they have the same elements. Axiom of an empty set: There is a set with no elements. Axiom of pairing: If x, y are sets, then so is {x,y}, a set containing x and y as its only elements. Axiom of union: Every set has a union. That is, for any set x there is a set y whose elements are precisely the elements of the elements of x. Axiom of infinity: There exists a set x such that {} is in x and whenever y is in x, so is the union y U {y}. Axiom of separation (or subset axiom): Given any set and any proposition P(x), there is a subset of the original set containing precisely those elements x for which P(x) holds. Axiom of replacement: Given any set and any mapping, formally defined as a proposition P(x,y) where P(x,y) and P(x,z) implies y = z, there is a set containing precisely the images of the original set's elements. Axiom of power set: Every set has a power set. That is, for any set x there exists a set y, such that the elements of y are precisely the subsets of x. Axiom of regularity (or axiom of foundation): Every non-empty set x contains some element y such that x and y are disjoint sets. Axiom of choice: (Zermelo's version) Given a set x of mutually disjoint nonempty sets, there is a set y (a choice set for x) containing exactly one element from each member of x. Relations and algebras

  8. Relations • n-ary relation between the sets A1, A2, ..., An • Examples: • D = a set of possible days • M = a set of VŠB rooms • Z = a set of VŠB employees A ternary relation meeting (when, where, who): Relations and algebras

  9. Binary relations • Inverse relation: • Composition of relations Relations and algebras

  10. Binary relations Binary relation r on a set A is called: • Reflexive: x A: (x,x) r • Irreflexive: x A: (x,x) r • Symmetric: x,y A: (x,y) r (y,x) r • Antisymmetric: x,y A: (x,y) r and(y,x) r x=y • Asymmetric: x,y A: (x,y) r (y,x) r • Transitive: x,y,z A: (x,y) r and(y,z) r (x,z) r • Cyclic: x,y,z A: (x,y) r and(y,z) r (z,x) r • Continuous: x,y A: x=y or (x,y) ror (y,x) r Relations and algebras

  11. Binary relations The important types of binary relations: • Tolerance – reflexive, symmetric • Quasi-ordering – reflexive, transitive • Equivalence – reflexive, symmetric, transitive • Partial ordering – reflexive, antisymmetric, transitive Relations and algebras

  12. Binary relations Examples: • Tolerance: • „being similar to“ on a set of people, • „being no more than one year older or younger“ on the set of people, ... • Quasi-ordering: • on a set of sets: the sets X and Y are related iff |X||Y|, • divisibility relation on the set of integers, • „not to be older“ on a set of people, ... • Equivalence: • „being of the same age“ on the set of people, • identity on the set of natural numbers, ... • Ordering: • Set-theoretical inclusion on a set of sets, • divisibility relation on the set of natural numbers, ... Relations and algebras

  13. Mappings (functions) • f A  B is called a mappingfrom a set A into a set B (partial mapping), iff: (x A, y1,y2B) ( (x,y1) f and(x,y2) f y1 = y2) • f is called amapping of a set A into a set B (total mapping,written as:f: AB), iff: • f is mapping from A to B • (x A)(y B) ( (x,y) f) • If f is a mapping and (x,y) f, then we write f(x)=y Relations and algebras

  14. Mapping (functions) • Examples: u = {(x,y)ZZ; x=y2}, v = {(x,y)NN; x=y2}, w = {(x,y)ZZ; y=x2} • r, u – are not mappings • s, v – are partial mappings from A to B, (not total) t, w – are total mappings r A  B s A  B t A  B Relations and algebras

  15. Mapping (functions) Mapping f: AB is called • Injection (one to one total mapping of A intoB), iff: x1,x2A, y B: (x1,y) f and(x2,y) f x1 = x2 • Surjection (mapping of A ontoB), iff: y B xA: (x,y) f • Bijection (one to onemapping of A ontoB)(mutually single-valued), iff it is injection and surjection. Relations and algebras

  16. Mapping (functions) • Examples: j: ZZ, j(n)=n2, k: ZN, k(n)=|n|, l: NN, l(n)=n+1,m: RR, j(x)=x3 • f, j – are neither injections nor surjections • h, k – are surjections, not injections • g, l – are injections , not surjections • I,m – are injections and surjections simultaneously  bijections f: A  B g: A  B h: A  B i: A  B Relations and algebras

  17. Partitions and equivalences • Partition on a set A is a system such that:X = {Xi; i  I } • Xi A for i  I • XiXj = Ø for i,j  I, i  j • U X = A (the union of Xi= A) Xi – classes of the partition • Fine graining of a partition X = {Xi; i  I } is a system such that: Y = {Yj; j  J }, iff: • j  J, i  I so that Yj Xi Relations and algebras

  18. Partitions and equivalences • Let r be an equivalence relation on a set A, X is a partition on A, then it holds: • Xr = {[x]r; xA} a partition on Ainduced by equivalence r; • where [x]ris the class of those elements that are equivalent with x • quotient set(factor set) of the set A induced by the equivalence r • rX = {(x,y); x and y belong to the same class of the partition X} – equivalence on A (induced by the partition X) Example: • r ZZ; r = {(x,y); 3 divides x-y}  X={X1, X2, X3} • X1={…-6, -3, 0, 3, 6, …} • X2={…-5, -2, 1, 4, 7, …} • X3={…-4, -1, 2, 5, 8, …} Relations and algebras

  19. Orderings • If r is an order relation on A, then a couple (A,r) is called an ordered set • Examples: (N, ), (2M, ) • Coverrelation Let (A, ) be an ordered set, (a,b)A a –< b („b covers a“), iff: a < b and c A: a  c a c  b • Examples: (N, ), –< ={(n,n+1); n  N} Relations and algebras

  20. Orderings • Hasse diagram –graphicalpicturing • Example: (A, ), A={a,b,c,d,e} r = {(a,b), (a,c), (a,d), (b,d)}idA idA={(a,a): aA} Relations and algebras

  21. Orderings An element a of an ordered set (A, ) is called: • The least: for xA: a  x • The greatest: for xA: x  a • Minimal: for xA: (x  a  x = a) • Maximal: for xA: (a  x  x = a) • Example: • The least: does not exist • The greatest: does not exist • Minimal: a, e • Maximal: d, c, e Relations and algebras

  22. Orderings • A mapping of the ordered sets (A, ), (B, ) is called isomorphic, iff there is a bijection f: AB such that: x,yA: x  y, iff f(x)  f(y) • A mapping of the ordered sets (A, ), (B, ) is called isotonef: AB, when the following holds: x,yA: x  y  f(x)  f(y) • Examples: • f: NZ, f(x)=kx, k Z, k  0 is isotone • g: NZ, g(x)=kx, k Z, k  0 is not isotone Relations and algebras

  23. Orderings • Let(A, ) be an ordered set, M  A, then • LA(M)={xA;mM: x  m} • The set of lower bounds of M in A • UA(M)={xA;mM: m  x} • The set of upper bounds of M in A • InfA(M) – The greatest element of the set LA(M) • Infimum of the set M in A • SupA(M) – The least element of the set UA(M) • Supremum of the set M in A Relations and algebras

  24. Lattice defined as an ordered set • A set(A, ) is called a lattice (lattice-like ordered set), iff: x,yA s,i A : s = sup({x,y}), i = inf({x,y}) • Notation: • x  y = sup({x,y}) (join) • x  y = inf({x,y}) (meet) • If sup(M) and inf(M) exist for everyM  A, then (A, ) is called a complete lattice Relations and algebras

  25. Algebra Algebra (abstract algebra) is a couple: (A, FA): • A Ø – an underlying set of the algebra • FA = {fi: Ap(fi)A; iI} – a set of operations (functions, mappings) on A • p(fi) – the arity of an operation fi • Examples: • (N, +2,2) the set of natural numbers with the addition and multiplication operations • (2M, , )the set of all subsets of a set M with the intersection and union operations • (F, , ) The set (F) of the propositional logic formulas with the conjunction and disjunction operations Relations and algebras

  26. Algebras with one binary operation Grupoid G=(G,) • : G  G  G • If a set G is finite, then the grupoid G is called finite • Order of a grupoid = |G| Examples of grupoids: • G1=(R,+), G2=(R,), G3=(N,+) ... Relations and algebras

  27. Algebras with one binary operation • We can define a finite grupoid G=(G,) byCayley table • Example: • G = {a,b,c} • For example: a  b = b, b  a = a, c  c = b ... Relations and algebras

  28. Algebras with one binary operation Let G=(G,) be a grupoid, then G is: • Commutative, if • (a,bG)(a  b = b  a) • Associative, if • (a,b,cG)((a  b)  c = a  (b  c)) • With a neutral element, if • (e G aG)(a  e = a = e  a) • With an aggressive element, if • (o G aG)(a  o = o = o  a) • With an inverse elements, if • (aG b G)(a  b = e = b  a) Relations and algebras

  29. Algebras with one binary operation Examples: • (R,), (N,+) – commutative and associative • (R,), a  b = (a+b) / 2 – commutative, not associative • (R,), a  b = ab– neither commutative nor associative • (R,) – 1 = the neutral element, 0 = the aggressive element Relations and algebras

  30. Algebras with one binary operation Let G=(G,G) be a grupoid. HG is called closed with respect to the operation G, if • (a,bH)(a Gb H) A Grupoid H=(H,H) is a subgrupoid of a grupoid G=(G,G), if it holds: • Ø  H  G is closed • a,bH: a Hb = a Gb • Examples: • (N,+N) is a subgrupoid of (Z,+Z) Relations and algebras

  31. Algebras with one binary operation • Let G =(G, G), H =(H, H) begrupoids and h:GHbe a mapping. Thenhis a homomorphismofthegrupoidGintothegrupoidH, ifa,bG: h(a Gb) = h(a) Hh(b) Typesofhomomorphism: • Monomorphism – hisinjective • Epimorphism – hissurjective • Isomorphism – hisbijective • Endomorphism – H=G • Automorphism – isbijective and H=G Examples: • (R,+), h(x)= -x , his automorfismus (R,+) intoitself • h(x+y) = -(x+y) = (-x) + (-y) = h(x) + h(y) Relations and algebras

  32. Algebras with one binary operation r is called a congruence on a grupoid G=(G,G), iff: • r is a binary relation on G: r GG • r is an equivalence • (a1, a2), (b1, b2)  r  (a1 Gb1, a2 Gb2)  r The factor grupoid of a grupoid G induced by the congruence r: G/r=(G/r,G/r), [a]rG/r[b]r = [a Gb]r Example: • r ZZ; r = {(x,y); 3 divides x-y} • r is a congruence on (Z,+) Relations and algebras

  33. Algebras with one binary operation Typesofgrupoids: • Semigroup– anassociativegrupoid • Monoid– a semigroupwiththeneutral element • Group – a monoidwiththe inverse elements (i.e., theoperationisassociative, thereistheneutral element, and to each element thereisaninverseone) • Abeliangroup– a commutativegroup Examples: (Z isthe set ofintegers, N isthe set ofnaturals) • (Z, –) – grupoid, not a semigroup • (N – {0}, +) – semigroup, not a monoid • (N, ) – monoid, not a group • (Z, +) – Abeliangroup, • neutral element is 0, inverse element is –x (minus x) • (Z, ) – Abeliangroup, • neutral element is 1, inverse element is 1/x Relations and algebras

  34. Algebras with two binary operation Algebra (A,+,·) is called a Ring, if: • (A,+) is a commutative group • (A,·) is a monoid • For a,b,cA holds: a·(b+c)=a·b+a·c, (b+c)·a=b·a + c·a • If |A|>1, then (A,+,·) is called a non-trivial ring. • Let 0 A is the neutral element of the group (A,+). Then 0 is called the ring zero (A,+,·). • Let 1A is the neutral element of the monoid (A,·). Then 1 is called the ringunit (A,+,·). Relations and algebras

  35. Algebras with two binary operation A ring (A,+,·) is called afield, if: • (A - {0},·) is a commutative group Examples: • (Z,+,·) – a ring, not a field • (R,+,·),  (C,+,·) – fields Relations and algebras

  36. Lattice – algebraic structure • Lattice L = (L, , ) • : L  LL, : L  LL • x, y, z  L it holds: Relations and algebras

  37. Lattice – algebraic structure Let (A, , ) be a lattice, (B, ) be a lattice ordered set • Let us define a relation  on A : a b, iff a  b = b • Let us define the operations meet and join  and  on B a b = sup{a,b}, a b = inf{a,b}, Then the followingholds: • (A, ) is a lattice ordered set, where: sup{a,b}= a  b, inf{a,b}= a  b • (B, , ) is a lattice • (A, , ) = (A, , ) Relations and algebras

  38. Lattice – algebraic structure A lattice (L, , ) is called: • Modular, ifitholds: x, y, z  L : x  z x  (y  z) = (x  y)  z • Distributive, ifitholds: x, y, z  L : x  (y  z) = (x  y)  (x  z) x  (y  z) = (x  y)  (x  z) • Complementary, ifitholds: : Thereisthe least element 0  L and thegreatest element 1  L, and x  L x’  L : x  x’ = 0, x  x’= 1 x’ iscalled a complementofan element x Relations and algebras

  39. Lattice – algebraic structure • Each distributive lattice is modular Examples: • M5 (diamond) – a modular lattice which is not distributive • N5 (pentagon) – is the smallest non modular lattice M5 N5 Relations and algebras

  40. Lattice – algebraic structure Lattice (L, , ) is called a Boolean lattice, if it is: • Complementary, distributive, with the least element 0  L and with thegreatest element 1  L Boolean algebra: • (L, , , –, 0, 1), – : LL is an operation of complement in L Example: • (2A, , ), A = {1,2,3,4,5,6,7} Relations and algebras

More Related