Expansion of terms in set definition?

First of all, I had no idea what to title this question, so feel free to change it to something more appropriate.

I have a set defined as such:

$\{a\frown b\mid a \in A \wedge b \in \{c\frown d\mid c \in C \wedge d \in D\}\}$

Is that logically equivalent to:

$\{a\frown (c\frown d)\mid a \in A \wedge c \in C \wedge d \in D\}$

Assuming that $\frown$ is an associative relation.

-

The sets are equal, regardless of whether $\frown$ is associative. For instance, a straightforward "element chase" shows this. More directly, note that $x=a\frown b$ for some $b$ of the form $c\frown d$ means precisely the same thing as $x=a\frown(c\frown d)$ for some $c$ and $d$.