Rarely, must is used as a past tense. Belshazzar, by H. Rider Haggard, has we went because we must, in a prose style which is perhaps deliberately archaic to reflect the ancient Egyptian context.
In this odd snippet, If Thoreau went because he would, Hawthorne went because he must, one might say the author is "playing with language".
But here's Ralph Waldo Emerson with What he did, he did because he must. I would not wish to say Emerson doesn't know his own language.
From comments under @Henry's answer, it seems something quite odd has been going on. Many people will know the archaic present tense mote because Freemasons & such still say So mote it be in a "ritual" context. Bizarrely, the past tense "must" eclipsed "mote" for present tense usage. But in so doing, "must" somehow almost completely lost its ability to still be used as a past tense.
In spite of all the above, ordinary mortals in ordinary contexts today should stick with the standard position put forward by other answers. Use had to for the past tense.
Under exactly the conditions that you have in the question.
Whose is used as a relative pronoun, to introduce a clause that describes something belonging to the noun phrase it follows.
Now, there are some people do object to the adjective senses of whose being used of inanimate antecedents, based on the mistaken belief that it comes solely from who, when it comes from whos which comes from hwæs which was the genitive of both hwa (who) and hwæt(what). The objection flies in the face of much eloquent usage, and is also rarer now.
Each is a determiner, it refers to all of the examples of the thing that will be named, so that what is stated of them singularly applies to every one of them.
We have "each pair is". Generally, those things covered by each are treated as singular, unless each follows a plural subject, in which case they are treated as plural, with a further exception allowing (some would say not, while some would say insisting, it's here we enter into a matter of debate) if the plural subject is the pronoun we.
Here we do not have each following a plural subject, so the singular should be used, and so it is. Again, we're fine.
Putting them together we have a noun phrase "The set of elements" followed by a relative pronoun, followed by a determiner which insists upon singular use of what follows, followed by a singular use.
It is perfectly grammatical. Looking for objections to different uses of the words involved, we find that not only are there none, there aren't even questionable objections to argue against.
Now, it is relatively rare. It's common here to use where instead of whose, which ironically is a use that does frequently find objectors saying where can only refer to place, literally or figurative.
It's common to use every or all. However each conveys a sense of precision; it's merely a side-effect of every being treated plural and each being treated singularly leading to a sense that we are focusing on each item rather than making a more sweeping statement, and there's no real lack of precision with every, but that impression is worth making in technical cases like mathematics.
And for that reason, it is relatively common in such contexts.
About the only possible objection I can see to this as a whole, is that the form "[Noun]1 of [Noun]2s whose each [Noun]3 is..." could be ambiguous as to whether it is [Noun]1 or its [Noun]2s that possesses the [Noun]3s that are being described.
However:
- It would generally be clear from context; ambiguous forms are only a problem if they result in ambiguous reading, otherwise we can object to just about every bare expression as leaving out some information and hence being ambiguous.
- It would lean heavily toward our interpreting it as saying that it is the [Noun]2s that have the [Noun]3s (in the example, the elements that have the pairs). Only if that reading was both incorrect, and it being incorrect was not clear from context, do we have a problem.
- In this case we have the form "The set of [Noun]2s whose [Noun]3s..." since it's extremely common to define sets in terms of the properties of its elements, we're led very strongly to the understanding that it is elements that have pairs. All the more so since the word used for the elements is element (now if that was element in another sense, that would be ambiguous, but in a totally different way).
- Unless we have another context to explain some special meaning of set, then the reading of the set having the pairs makes no meaning, and so will be instantly dismissed, leaving us with no ambiguity.
So that possible objection clearly doesn't apply here. It's also not a question of grammaticality.
In all, the form is not just grammatical, and reasonably common in the domain it is used in, but a good choice.
[Taking a look at the question on ELL, it seems that the problem was that it wasn't ambiguous enough, as what they meant was "set whose each pair of elements", which is neither of the readings I suggest are possible with the form, but that's a separate issue].
Best Answer
By request, an elaboration of my comments above.
Because has usually been treated as a subordinating conjunction. It can introduce tensed clauses of all kinds, indicating that they are involved in some way prior to some phenomenon or event.
Like many such conjunctions, it can be used to introduce a noun phrase (thus making it a preposition), but up until recently, when because was used as a preposition, an auxiliary preposition of was required, unlike other conjunctions like after or before, which don't require auxiliaries to be used when they have an NP object.
But recently people have taken to dropping the auxiliary of with because, though not with other conjunctions that take of as prepositions, like in spite, but only in some contexts:
Because seems to be in the process of changing from a requisite conjunction to an optional preposition. As usual, this involves different people trying out different constructions at different times and in different contexts to hear how they like it. Enough people now appear to be liking it that official notice has been taken. Because was the 2013 Word of the Year, as determined by the American Dialect Society and the Linguistic Society of America at their annual meeting.