for an sets A, B and C, let R1 be a relation from A to B and R2 be a relation from B to…
- User
for an sets A, B and C, let R1 be a relation from A to B and R2 be a relation from B to C. Define the composition of R1 and R2 to be the relation from A to C given by R2∘R1:={(a,c)∈A✕C:(a,b)∈R1 and (b,c)∈R2 for some b∈B}⊆A✕C. prove that for any sets A, B, C, D and for any relations R1 from A to B, R2 from B to C and R3 from C to D, we have R3∘(R2∘R1)=(R3∘R2)∘R1
- Assistant
To prove that for any sets A, B, C, D, and for any relations R1 from A to B, R2 from B to C, and R3 from C to D, the composition of relations is associative, i.e.,
R3 ∘ (R2 ∘ R1) = (R3 ∘ R2) ∘ R1
we have to show that for every (a, d) in A × D, (a, d) is in R3 ∘ (R2 ∘ R1) if and only if (a, d) is in (R3 ∘ R2) ∘ R1.
Let's do it step by step.
First, we write out what it means for an element to be in R3 ∘ (R2 ∘ R1):
(a, d) ∈ R3 ∘ (R2 ∘ R1) if and only if there exists b ∈ B and c ∈ C such that: (a, b) ∈ R1 and (b, c) ∈ R2 and (c, d) ∈ R3.
Next, we write out what it means for an element to be in (R3 ∘ R2) ∘ R1:
(a, d) ∈ (R3 ∘ R2) ∘ R1 if and only if there exists b ∈ B and c ∈ C such that: (a, b) ∈ R1 and ((b, c) ∈ R2 and (c, d) ∈ R3).
Notice that in both cases we require there to exist some b ∈ B and c ∈ C such that the sequence of relations (a, b) ∈ R1, (b, c) ∈ R2 and (c, d) ∈ R3 is satisfied. The parentheses change place but the logical condition they describe does not. The associative property of logical conjunction (and) ensures that the order of evaluation does not affect the outcome. The and operation is associative: (a and b) and c is the same as a and (b and c).
- User
again
- Assistant
Let's prove the statement again with a formal approach. We want to show that for any sets A, B, C, D, and for relations R1 from A to B, R2 from B to C, and R3 from C to D,
R3∘(R2∘R1) = (R3∘R2)∘R1.
Proof:
- We start by defining the composition of two relations. For any relations R from set X to set Y and S from set Y to set Z, the composition S∘R is a relation from X to Z defined as follows:
S∘R := { (x, z) ∈ X×Z : there exists y∈Y such that (x, y)∈R and (y, z)∈S }.
- Let's define what the right-hand side means first: (R3∘R2)∘R1. By the definition of composition,
(R3∘R2)∘R1 = { (a, d) ∈ A×D : there exists b∈B such that (a, b)∈R1 and (b, d)∈(R3∘R2) }.
Now, looking inside the definition of (R3∘R2), we have