Cups and caps thm: f(k,l)<= {k+l-4 \choose k-2)+1 and this is sharp
Proof: f(3,k)=k. Ind: someone is rightmost of (k-1)-cup and leftmost of (l-1)-cap, one is extendable.
Sharpness follows from flattening X(k-1,l) and X(k,l-1) and putting them diagonally.
For n(k) we have slightly better - we know 2^{k-2}+1<=n(k)<= f(k,k-1).
Lower bound: 2^{k-2}=\sum_{i=2}^k f(i,k+2-i) and place flattened copies of X(i,k+2-i) on diagonal.
Upper bound: two tricks, one saves a lot, the other only one.
1, using projection from canvas such that top point is on horizon, we push it to infinity.
convex sets are unchanged (cups and caps might change), so we are good.
2, we start cups and caps such that vertical line touches two left-most points: f'(k,l)=f(k,l)-1
Proof: Add one more point to left from midpoint of left-mosts, k-cup or l-cap, also in original.
Hw: Prove that for all k there is a large enough N such that for n>=N points on the plane, either there is a subset of k points on a line or a subset of k points in general position.