19 - 3.9 1 IF R ⊆ A × B then id A ◦ R = R = R ◦ id B...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
The notation R S may be read as ‘ R composed with S ’ or ‘ R circle S ’. The relation R S is only defined if the types of R and S match up. For example, we can define the set grandparent = parent parent by: x grandparent of y iff z . ( x parent of z ) ( z parent of y ). Using the R and S from example 3.5, we have R S = { (1 , 1) , (2 , 4) , (3 , 3) , (4 , 2) } S R = { (1 , 3) , (2 , 2) , (3 , 1) , (4 , 4) } Contrast this notation for relational composition with the Haskell notation for functional composition: (g.f) x = g ( f x) With the Haskell notation, the functional composition g . f reads ‘ f followed by g ’, whereas the relational composition R S reads ‘ R followed by S ’. Very confusing! 3.3 Equalities between Relations Recall from proposition 2.5 that we can prove certain equalities between sets constructed from the set operations. We can also similar equalities between relations constructed from the operations on relations. P ROPOSITION
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3.9 1. IF R ⊆ A × B , then id A ◦ R = R = R ◦ id B . 2. ◦ is associative: that is, For arbitrary relations R ⊆ A × B and S ⊆ B × C and T ⊆ C × D , then R ◦ ( S ◦ T ) = ( R ◦ S ) ◦ T. Proof The prooF oF part 1 is simple and leFt as an exercise. We prove part 2. Let R , S and T be relations specifed in the proposition, and let ( x,u ) be an arbitrary member oF ( R ◦ S ) ◦ T . We show that ( x,u ) ∈ R ◦ ( S ◦ T ) using the Following reasoning: x ( R ◦ S ) ◦ T u ⇒ ∃ z. x ( R ◦ S ) z ∧ z T u ⇒ ∃ z. ( ∃ y. xRy ∧ y S z ) ∧ z T u ⇒ ∃ z,y. ( xRy ∧ y S z ∧ z T u ) ⇒ ∃ y. ( xRy ) ∧ ( ∃ z.y S z ∧ z T u ) ⇒ ∃ y. ( xRy ) ∧ ( y S ◦ T u ) ⇒ xR ◦ ( S ◦ T ) u 20...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern