Denote $I=(0, 1)$, and let $\mu$ be the Lebesgue measure on $I$. Does there exist a function $f$ on $I\times I$ viewed as an element of the space $L^\infty(\mu\times\mu)$ such that 
$$
f^2=f
$$
(that is, $f$ takes values 0 and 1);
$$
f(x, y)+f(y, x)=1
$$
(that is, if $f(x, y)=0$ then $f(y, x)=1$, and vice versa);
and $f$ admits a representation
$$
f(x, y)=\int\_I g\_t(x)\cdot h\_t(y)\,dt
$$
(which in particular contains representations as sums $\sum\_k g\_k(x)\cdot h\_k(y)$) with
$$
\int\_I \|g\_t\|\_\infty\cdot \|h\_t\|\_\infty\,dt<\infty,
$$
where $\|\cdot\|\_\infty$ stands for the norm in the space $L^\infty(\mu)$?


**Remark** (update): If we replace the $L^\infty$-norms by the $L^2$-norms in the last formula, we obtain the condition for the integral operator on $L^2(\mu)$ with kernel $f$ to belong to the trace class. Observe that this operator belongs to the Hilbert-Schmidt class for any kernel $f$ satisfying the above properties because $f$ is square-summable.


Update No.2. The integral operator whose kernel is the indicator of the triangle $\{x<y\}$ is not of trace class. (Proof: If it is of trace class, then so is the integral operator whose kernel is the indicator of the rhombus, but [this is not true](https://mathoverflow.net/questions/183004/what-happens-if-we-rotate-the-kernel-of-an-integral-operator/183061#183061).) Therefore, the set $\{f=1\}$ must be very complicated near the diagonal: no subset of $I$ can give us a 'triangular' structure of $f$ even after an arbitrary rearrangement.



An indicator of a planar subset as an element of a tensor product
Well, I am not sure, but let me try to prove that the answer is negative. 


The idea is to prove that any function $f(x,y)$ given by $\int g\_t(x)h\_t(y)dt$ is continuous with respect to appropriate admissible metric, where admissible means ``separable on the set of full measure.'' Namely, for any $x$ define $F\_x(t)=g\_t(x)\|h\_t(y)\|\_{\infty}$. For any $x$ we get a function $F\_x(t)$ in (the unit ball of) $L^1(I)$. Thus the pushforward of the metric in $L^1(I)$: $\rho(x\_1,x\_2):=\|F\_{x\_1}-F\_{x\_2}\|\_{L^1(I)}$ defines an admissible metric on $I$. Define analogous metric for $y$'s. Next, sum they up and we get still admissible metric on $I$ which we denote $\rho$ too. Note that $f(x,y)$ is continuous and even 1-Lipschitz in variable $x$ in our metric $\rho$. Analogously for $y$. Note that what we actually use is that $\int |g\_t(x)|\cdot \|h\_t(y)\|\_{\infty} dt<\infty$ for any $x$ and viceversa, this is bit weaker than your condition. 


Now consider the metric measure space $(I,\mu,\rho)$. Since $(I,\rho)$ is separable, there exists a ball $B(x\_0,1/10)$ of radius $1/10$ which has positive measure. Thus $|f(x,y)-f(y,x)|\leq 4/10$ for almost all $x,y$ in this ball. This is impossible by the very definition of $f$.


The above argument is essentially borrowed from <http://lanl.arxiv.org/abs/1410.0898> and I am glad if our theory may be helpful.


