context sensitive language finite or infinite let L be a CSL. (my understanding/ memory/ expectation is) the problem 


  is L finite or infinite? 


is undecidable.


where was this 1st proved/ published?
are there any cases in the literature of analyzing a CSL L in some "limited context" and determining whether it is finite or infinite? (also wondering about machine learning contexts.)


(brief background: the question can arise in analysis/ application of automated theorem proving. one might reduce a theorem "there exist an infinite x" to a CSL L which enumerates x and the question of whether L is finite or infinite.)
It's a standard theorem that it's undecidable whether a given context-sensitive grammar generates the empty language or not.

From this, we can prove that it's undecidable whether a context-sensitive grammar is finite or infinite.  Let $L$ be a context-sensitive language.  By the standard closure properties for CSL's, if $L$ is context-sensitive, then so is $L^+$.  Now if $L$ is empty, then $L^+$ is empty (and thus finite); but if $L$ is non-empty, then $L^+$ is infinite.  Consequently, if it were decidable to check whether a CSL is finite or infinite, we could apply that decider to $L^+$ and learn whether $L$ was empty or not -- but the theorem mentioned above implies this is impossible.

Therefore, determining whether a given context-sensitive grammar generates a finite or infinite language is undecidable.

Footnote: You can find a proof of the standard theorem above in many places; e.g., these lecture notes from CS 373 at U Illinois.  The result is also mentioned in passing on Wikipedia, which cites Hopcroft and Ullman -- a standard resource on formal languages.  The same Wikipedia article also mentions some smaller classes of languages that are contained in CSL.