Is it all right to invite a professor to cowrite a paper I managed to improve the techniques of a year-old paper to get a significantly stronger result. I used original ideas, but a large part relies upon results of the original paper. (to the point that half the paper may be recapping the lemmas of the past paper)
Q1) Is it acceptable to ask the author of the original paper if they would like to collaborate? 
I have heard that Paul Erdos would do this, which is something I highly admire. However, I am an undergraduate, so I fear my invitations would not be appreciated. 
Q2) If it is acceptable, how do I make sure to make my invitation not pushy or expectant? 
I'm thinking of writing something like:

I was wondering if anyone else had already achieved this result, and
  if it would be fit for publishing. If yes, while I fear it may be rude
  to invite you to collaborate, please let me know if you are at all
  interested in getting involved.

 A: I think a preliminary step is to talk to an advisor or someone near you who can read your paper.  The intention you state is good, but I think it could be phrased more artfully.  Here is what I recommend.


*

*Line up one or two people at your institution (people who taught one of your classes, or someone in your  department who might have contact with the professor whose work you have used).  Get their opinion on the advisability of reaching out and making your request.  Ask them for how they might word your request.

*If possible, contact a student or coauthor of this professor and relate your concerns.  As I understand it, your first concern is to get your work published and your second is not to step on any toes, especially those of the person whose work you have extended.  If this student or coauthor is in the relevant fields, ask them for a sense of how publishable your result is.

*Based on this feedback, choose to approach the professor with the intention of announcing your work to him and ask if he (pronoun presumption on my part) is interested  in reading it.  Then let him make the next move.
In all of this, pick someone to tell of your process.  There should be no reason for anything horribly wrong to happen.  If and when it does happen, it helps to have someone who already knows your side of the story.
Gerhard "Plans To Backup His Backups" Paseman, 2020.06.12.
