Set theory: defining sets via set builder notation. I have something very basic confused in my head and I can't seem to straighten it out.
Here is a simple example of defining a set
$$A = \{ 1, 2, 3\}$$
$$B =  \{ x \mid x \in A \} = A$$
It's pretty basic, but what if I wanted to to create a set of subsets
$$C = \{\{\text{dog}, 1, \text{cat}\}, \{\text{dog}, 2, \text{cat}\}, \{\text{dog}, 3, \text{cat} \}\} ?$$
Can you simply write
$$C = \{\{\text{dog}, x, \text{cat}\} \mid x \in A \} $$
Or how about 
$$C = \{\{\text{dog}, x, \text{cat}\} \forall x \in A \}? $$
Sorry; I'm sure this must be out there but everything that I Google seems to come up with unions or counting combinations so I guess I'm missing something major linguistically.
 A: In general $\{f(x)|x\in A\}$ denotes the set of values of $f(x)$ for $x\in A$. In particular, calling this set $S$ we have $\forall y(y\in S\iff\exists x\in A(y=f(x)))$, which implies the weaker but conceptually simpler result $$\forall x\in A (f(x)\in S).$$ The choice $f(x)=x$ gives your definition of $B$; note you didn't write $\{x\forall x\in A\}$, though if you had it would have been clear you meant "$B$ is the $x$ for all $x$ in $A$". Similarly, your first attempt at writing $C$ in terms of $A$ was correct while your second wasn't, but at least your intuition is clear.
For what it's worth, that $\forall$-based intuition is usd in some programming languages, e.g. in Python you can write S = [f(x) for x in A] to define $S$ (programmers call this assignment), making the following Python statement true: all([f(x) in S for x in A]) (which means $\forall x\in A (f(x)\in S)$). So your first attempt to write $C$ in terms of $A$ followed the logic of the Pythonic assignment, while the second was an attempt to write the Boolean fact my second piece of Python stated.
