Apologies if I've got some of the terminology here wrong, typed lambda calculus is a bit new to me.
Let's say we've got a type in simply-typed lambda calculus with no basic types (functions and type variables only; so types like $a \to b \to a$ being the type of $K$, etc.). Let's say the length of the type is the total number of variables appearing in it (so above we have a length of $3$ for $a \to b \to a$); I realize it's more common to count the arrows as well, but since that just takes the length $\ell$ to $2\ell-1$, this is just me rephrasing things slightly, not introducing a new notion.
Let's now consider the length of a function (combinator) to be the total number of variables appearing in it when written in $\lambda$-notation in normal form (we'll only be considering typable functions here so they'll all have normal forms), including those introduced by the $\lambda$s; e.g., $K=\lambda x.\lambda y.x$ has length $3$, same as its type.
Question: Given a type, such that there is at least one function of that type (i.e. one that corresponds to an intuitionstic tautology, if I understand correctly), is there always a function of that type with length no greater than the type itself?
Thank you all!
(Background: This question is an indirect followup to this question, where in the comments I hypothesized a connection between the length of the function and the length of the type. Specifically, had I thought that under appropriate conditions on the functions and types, the length of the function and of the type had to be equal, or at least that we could perhaps get an inequality. However, this turned out to be false even under pretty strong conditions, as shown by comparing $SI=\lambda x.\lambda y.y(xy)$ (length 5) vs $((a \to b) \to a) \to (a \to b) \to b$ (length 6), or $2=\lambda x.\lambda y.x(xy)$ (length 5) vs $(a \to a)\to a \to a$ (length 4), both are which pretty nice functions/types, but which fail in opposite ways. So, no inequality there. This is basically the only rescue I could come up with that still seems to make sense, even if it's too weak to be of any use for my original purposes.)