# Show that functional dependency pseudotransivity holds using closure test

I'm currently studying a basic database course with the course literature Database Systems - The Complete Book1.

In one of the book's exercises you are asked to

Show that the following rules hold, by using the closure test.

This is the closure test described in the book:

And the question I'm having trouble with is as follows: How can I show that the rules hold? Can I do it by computing the closures of the relevant attributes somehow prove that?

1 Garcia-Molina, H. & Ullman, J. D. & Widom, J. (2009). Database Systems - The Complete Book, Second Edition. Pearson Education Inc., Upper Saddle River, NJ, USA.

The definition of Pseudotransitivity given above is equivalent to say the following.

From:

``````(1) A1 A2 ... An -> B1 B2 ... Bm
(2) B1 B2 ... Bm E1 E2 ... Ej -> D
``````

we can derive:

``````(3) A1 A2 ... An E1 E2 ... Ej -> D
``````

Here is a possible simple proof.

Let’s try to compute the closure of `{A1 A2 ... An E1 E2 ... Ej}` from the first two functional dependencies. If this closure contains `D` then we have proved the hypothesis.

``````{A1 A2 ... An E1 E2 ... Ej}+ = A1 A2 ... An E1 E2 ... Ej    (starting point)
{A1 A2 ... An E1 E2 ... Ej}+ = A1 A2 ... An B1 B2 ... Bm E1 E2 ... Ej (by using 1)
{A1 A2 ... An E1 E2 ... Ej}+ = A1 A2 ... An B1 B2 ... Bm D E1 E2 ... Ej (by using 2)
No other derivation is possible.
``````

So, since `D` is included in the closure of `{A1 A2 ... An E1 E2 ... Ej}`, we have shown that `A1 A2 ... An E1 E2 ... Ej -> D`.