Set Theory Problems

Let (a, b, c, d in mathbb{R} ) be objects not necessarily distinct from one another; moreover, let ( A = { {a } , { a, b } } ) and let ( B = { {c } , {c , d } } ). Prove that ( A = B ) if and only if ( a = c ) and ( b = d ).

To prove the above theorem requires proving the following two statements:
(i) If ( A = B ) then ( a = c ) and ( b = d ).
(ii) If ( a = c ) and ( b = d ) then ( A = B ).

By definition the two sets ( A ) and ( B ) are equal if every element in ( A ) is also in ( B ) and if every element in ( B ) is also in ( A ). Let ( P = { a } ), ( Q = {a , b } ), ( R = { c } ), and ( R = {c , d } ). Now consider statement (i). If ( A = B ) then ( P,Q in B ) and ( R,S in A ) which implies ( P = R ) and ( Q = S ) which by definition implies ( a = c ) and ( b = d ). Now consider (ii). If ( a = c ) and ( b = d ) then by definition ( P = R ) and ( Q = S ). Since ( P = R ) and ( Q = S ) it is the case that ( A = B ) since every element in ( A ) is also in ( B ) and every element in ( B ) is also in ( A ).