Artificial intelligent assistant

Prove that $E$ is an equivalence relation on $S$ Let $S$ be a set and $p$ is a partition of $S$. A relation $E$ defined on $S$ by letting $xEy$ if and only if $x$ and $y$ are contained in the same member of $p$ for all $x,y \in S$ Prove that $E$ is equivalence. I know that I need to show 3 things 1) $xEx$ for all $x \in S$ 2) $xEy$ -> $yEx$ for all $x,y \in S$ 3) $xEy$ and $yEz$ -> $xEZ$for all $x,y,z \in S$ but I don't know how to explain how I got these three conditions.

For the first two, your logic should be as follows:

1) Let $x \in S$ be any given element. Clearly, $x$ is contained in the same subset as $x$, so by definition of $E$, $xEx$.

2) Let $x,y \in S$ be given, and suppose that $xEy$, i.e. that $x$ and $y$ are contained in the same subset. Then also $y$ and $x$ are contained in the same one, since simply mentioning them in a different order does not change anything. That is, $yEx$.

The third one you should also be able to realize by simply writing out what the assumptions $xEy$ and $yEz$ mean.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 25e99863430fa08bc9862787d5e6fc77