Let $K \subseteq A \times B$. Prove that there exists sets $K_1 \subseteq A, K_2 \subseteq B$ such that $K = K_1 \times K_2$
This seems so easy and intuitive but somehow I am struggling to prove this.
I defined $K_1 := \{a \in A: \exists b \in B:(a,b) \in K\}$ and analoguous $K_2$ and could prove the inclusion $K \subseteq K_1 \times K_2$, but the other one doesn't seem to work out.
This claim is false.
For a simple counterexample, take $A = \{0,1\}$, $B= \{\text{red},\text{green}\}$, and $K = \{(0,\text{red}),(0,\text{green}),(1,\text{red})\}$.