# Defining $f: A \times B \rightarrow C$ where $A$ might be empty

Given a function $f: A \times B \rightarrow C$, I'd like to define a special case where $A$ could be the empty set. In this case, I would like the function to "decay" into $f: B \rightarrow C$, i.e. simply ignore the (non-existent) $A$ value. Is there a canonical way of doing this?

This seems related to the empty function and How to construct a function from a pair of possibly empty sets?, but I'm not sure how this would be applied to a function taking two inputs.

• You are asking for a function with variable domain. You could almost call that a contradictio in terminis. – drhab Jul 28 '16 at 13:05

If $A = \varnothing$ is empty, then $A \times B = \varnothing$ is empty too; it is not equal to $B$. So there is only one possible function $f : A \times B = \varnothing \to C$, namely the empty function.
If you want you can do something else and say "If $A$ is non-empty we define $f : A \times B \to C$ by [...], if $A$ is empty we define a function $f : B \to C$ by [...]". But it is never reasonable to say that functions $A \times B \to C$ are the same thing as functions $B \to C$ when $A$ is empty.