Please note that the question is not whether the subject in a relative clause should be followed by は or が. (In that case I am aware that the thematic は cannot be used.)
I was reading section II.2, Wa and Ga, of the Structure of the Japanese Language by Kuno Susumu (1973). The section is a comprehensive discussion of those two particles and contrasted the use of the particles after the subject of a sentence/clause. Here is a sentence taken from the section.
Johnが好きな子はMaryです。
The author intended to illustrate the use of が in the relative clause. However, what I found interesting was the use of は after 子. I have two questions.
First, using は to mark the topic of a sentence requires some explicit or implicit context. In brief, my question is whether the relative clause can serve as context that enables the sentence "Johnが好きな子はMaryです" be placed at the beginning of a discourse.
When we say "as for X, ..." we need to make sure that the listener already knows what X refers to, either from previous context, or from general knowledge (e.g. X = the sun). The author wrote that the the thematic は requires the topic to be anaphoric, meaning that it has already been entered into registry of the present discourse. Obviously we can't begin speech with "子はMaryです" because the listener wouldn't know what 子 is being talked about. But when 子 is being modified with the relative clause "Johnが好きな", is that sufficient to make "Johnが好きな子はMaryです" the first sentence of a discourse?
Secondly, is there a situation that would make
Johnが好きな子がMaryです。
grammatically correct?
Edit: as noted in the comment section, it would sound very abrupt to begin speech with Johnが好きな子はMaryです. Let's pretend that the social dimension of communication can be separated from transmission of information. For the purpose of conveying information only, can a relative clause serve as context for the subject to be marked with は?