Is this a valid proof that A = B given A ∩ B = A ∪ B? Here is my proof. My instructor claims that it is invalid because I did not use a set membership table, and that the use of a predicate logic truth table is invalid.
That makes no sense to me. If I can do S := { x | P(x) }, then I should obviously be able to use predicate logic on the members of sets!
Given 2 sets A and B such that A ∩ B = A ∪ B, what can be concluded about A and B?

A ∩ B = A ∪ B                                                           restatement

∀x(x ∈ A ∩ B ↔ x ∈ A ∪ B)                                               definition of set equality

∀x(x ∈ A ∧ x ∈ B ↔ x ∈ A ∨ x ∈ B)                                       set membership distributed over union and intersection

p(x) := x ∈ A

q(x) := x ∈ B

p    q    p ∧ q    p ∨ q    p ∧ q ↔ p ∨ q    p ↔ q

T    T      T        T            T            T

T    F      F        T            F            F

F    T      F        T            F            F

F    F      F        F            T            T

∀x(x ∈ A ↔ x ∈ B)                                                        logical equivalence (p ↔ q ≡ p ∧ q ↔ p ∨ q)

∀x(x ∈ A → x ∈ B ∧ x ∈ B → x ∈ A)                                        logical equivalence (p → q ∧ q → p ≡ p ↔ q)

∀x(x ∈ A → x ∈ B) ∧ ∀x(x ∈ B → x ∈ A)                                    universal quantifier distributed over conjunction

A ⊆ B ∧ B ⊆ A                                                            definition of subset

A = B                                                                     definition of set equality

We see that the sets A and B are equal. A and B may both be the empty set.

So, is my proof valid?
Edit: after further reflection, I think the point of contention may be the use of a truth table to demonstrate logical equivalence over an infinite domain. This proof may not be valid for infinite sets. I could instead demonstrate the logical equivalence p ↔ q ≡ p ∧ q ↔ p ∨ q another way.

Your proof is fine. That you have shown $(x\in A\land x\in B)\iff(x\in A\lor x\in B)$ is equivalent to $(x\in A)\iff(x\in B)$ extends to all $x$ with no problem; if $\phi(x)$ is equivalent to $\psi(x)$, $\forall x(\phi(x))$ is equivalent to $\forall x(\psi(x))$.
