Is it true that an infinite language is in P iff it is the range of a length increasing polytime function? I ask because I know that it is a basic result in computability theory that a set is recursive iff it is the range of an increasing recursive function and I was wondering if there might be an analogue in complexity theory.
I know that the "length increasing" (or at least monotone increasing) is a necessary one because otherwise we could construct the Halting Problem: Just have a polytime algorithm test computation histories for a given Turing machine $M$ on input $x$ and map valid halting ones to $(M,x)$. I also know that every language in P reduces to any NP-complete language and these languages are not in P (unless of course P=NP), but I think my question might be different: I am interested in the exact image of a function over ${\Sigma}^{*}$ and not if it happens to be properly contained in an NP-complete set. However, I don't know where to go from there. I would greatly appreciate any hints or counterexamples to demonstrate that my conjecture is false. Thanks.