Function of two sets intersection Let $U$ be the set of all nonempty subsets of $[0,1]$ that are a union of finitely many  closed intervals (where an "interval" that is a single point does not count as an interval). Does there exist a function $f:U\times U\rightarrow U$ such that for any $A,B\in U$:
(a) $f(A,B)\neq [0,1]$.
(b) $f(A,B)\cap A$ and $f(A,B)\cap B$ are of positive length (i.e. Lebesgue measure).
(c)  The length (i.e. Lebesgue measure) of $f(X,B)\cap A$ is maximized at $X=A$, and the length of $f(A,X)\cap B$ is maximized at $X=B$.
Any two of the three conditions can be satisfied:

*

*$f(A,B)\equiv [0,1]$ satisfy (b) and (c).


*$f(A,B)\equiv Y$ for any fixed $Y\neq [0,1]$ satisfy (a) and (c).


*$f(A,B)$ being any $Y\neq [0,1]$ that intersects both $A$ and $B$ satisfy (a) and (b).
Satisfying all three seems to be impossible though.
 A: Update: this is not quite a complete answer, since (c) might not hold if $A_{\epsilon/2}$ and $B_{\epsilon/2}$ are not disjoint.
My answer to the variant of this question appears to apply equally to the original here:
Let $\epsilon > 0$. For $X \in U$, let $X_t$ be the "least" subset of $X$ of length $\min(t, \lvert X \rvert)$. In other words, $X_t$ has length $t$ (or is all of $X$) and contains every element of $X$ that is less than the maximum of $X_t$. For example, $([0,1/4] \cup [1/2, 1])_{1/2} = [0, 1/4] \cup [1/2, 3/4]$.
Define $$f(A, B) := A_{\frac{\epsilon}{2}} \cup B_{\frac{\epsilon}{2}}.$$
(a): This follows from the definition of the problem, so long as $\epsilon < 1$.
(b): $f(A, B) \cap A \supset A_{\frac{\epsilon}{2}}$ and therefore has positive length. Similarly for $f(A, B) \cap B$.
(c): The length of $f(X, B) \cap A = (X_{\frac{\epsilon}{2}} \cap A) \cup (B_{\frac{\epsilon}{2}} \cap A)$ is maximized at $X=A$ if $A_{\epsilon/2}$ and $B_{\epsilon/2}$ are disjoint. Similarly for $f(A, X) \cap B$.
A similarly defined $f$ also works if $X_t$ is replaced with another canonically associated subset of $X$ of length $\min(t, \lvert X \rvert)$ (e.g. the "greatest" such subset) or if $\epsilon/2$ is replaced by smaller positive values.
