I've recently discovered a strange situation. A few years ago, a senior mathematician published a certain solo paper X. A few years prior to that, one of his students wrote a thesis Y on the same topic, and large parts of paper X are copied verbatim from thesis Y. In the thesis, it is indicated that the work is intended to be a joint publication between the author and the student, however neither the student's name nor the thesis are mentioned in paper X.
Note: I am not concerned about the general issue of duplicating material from a thesis in journal papers (this seems to be considered acceptable, e.g., How much overlap is permitted between a submitted journal article and a thesis? and How to avoid self-plagiarism when adapting dissertation into a paper?), but here the authors of X and Y are different.
This suggests some possibilities, none all that great:
the advisor plagiarized the student's thesis
the advisor didn't plagiarize the student, because the advisor actually wrote the thesis, and later decided the student didn't deserve co-authorship
the advisor and the student wrote the thesis together, but the advisor just claimed sole authorship (I believe the student left academia)
I know the advisor was working on this project before, so I suspect one of the latter two is closest to reality. I certainly thing something about this situation is wrong, but I don't know the details of what, so my question is:
To what extent is it acceptable for a student's advisor to physically write their PhD thesis?
I know sandwich theses are okay (depending on school), and in many areas theses comprise joint papers. So I suppose it happens that in certain fields, that a student might not write any of their "thesis", except the introduction. (In this case the introduction was copied also, but that's beside the point of this question.)
Note: In math, it is rare that the whole of a student's thesis work is published jointly with their advisor, even if the advisor did a lot of the work. However, in math my personal expectation is that thesis should largely be written by the student; even if an advisor does most of the work for the thesis, it should be largely written by the student. I'm interested in an answer for both math and non-math PhD theses, if there's a difference.