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.
 A: Your reasoning is perfectly valid. At the point where you use a truth table to show a propositional equivalence you're already looking at one particular $x$ (at a time), so the possibilities you need to consider are just the for rows of your table.
Formally, once you have established the propositional equivalence
$$ (p\land q)\leftrightarrow(p\lor q) \quad\equiv\quad p\leftrightarrow q $$
you're now allowed to substitute anything for $p$ and $q$, and it will be a valid equivalence -- even predicate-logic formulas.

(It is a bit the long way around, though. It's faster to see
$$ A \subseteq A \cup B = A \cap B \subseteq B $$
and vice versa, so $A\subseteq B$ and $B\subseteq A$, and therefore the sets are equal).
A: 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))$.
A: Let me show you a Fitch-style proof corresponding to your (correct)reasoning, to make sure you understand why it is valid:

Given any sets $A,B$ such that $A∩B = A∪B$:
  Given any object $x$:
    $x∈A∩B ⇔ x∈A∪B$.
    Thus $x∈A ∧ x∈B ⇔ x∈A ∨ x∈B$.
    Let $P :≡ x∈A$.
    Let $Q :≡ x∈B$.
    Then $P∧Q ⇔ P∨Q$.
    Thus $P ⇔ Q$.   [by the truth-table you gave]
    Thus $x∈A ⇔ x∈B$.
  Therefore $A = B$.

Note that you perform the same reasoning for any given object $x$, so even though the $P,Q$ in the above proof may differ in truth-value for different $x$, it still holds in every case that $P ⇔ Q$, and hence you get the conclusion you seek. If your instructor cannot understand this, ask him/her to give you any sets $A,B$ such that $A∩B = A∪B$ and any object $x$ and explicitly follow the proof to show (by a single use of the truth-table) that $x∈A ⇔ x∈B$. If it is clear that he/she cannot prevent your conclusion no matter what $A,B,x$ he/she gives you, then you have won. (This is called game semantics, by the way, and I recommend you think of quantifiers this way to fully grasp the meaning of order of quantification.)
