Consider the combinators $\mathbf{S} \equiv \lambda xyz . xz(yz)$, $\mathbf{I} = \lambda w.w$ and their application $\mathbf{SI}$. Is this term typable à la Curry?
From what I did so far, it seems it is not: I tried to construct a deduction tree from bottom to top, and on the top I concluded that in order to type $\mathbf{SI}$ the variable $x$ would have to have two different types. Is this correct? Is there an elegant way to show this?
Indeed $\mathbf{S}$ is typeable:
If you start from variable occurrences and propagate the information you infer from their usage (it is applied to something, then it must be an arrow of something; or it is the argument of something, then it must have the same type of the leftmost type of the something's arrow type), then you either find conflicting constraints, or conclude the process, thus having a counterexample or a type. Roughly, it is the idea behind Hindley–Milner W algorithm for type inference.
Let us see how to do it by considering $(\mathbf{S I})$ and generalising our previous argument.