Machine summary:
Mentioning opinions that invalidate a certain statement The majority of commentators—may Allah be pleased with them—said: "Shahadatu baynakum" (testimony among you) is the subject (mubtada), and "idha" is an adverb (zarf) stripped of containing the conditional meaning for the testimony, and "hina'idhin" (at that time), so the sentence is a genitive construction (mudaf ilayh) to "idha" without dispute.
His saying: ﴿فیقسمان باللّه﴾ (so they shall both swear by Allah): 'Al-Fa' is for conjunction and succession, and 'yuqsimani' means they both swear, which is the verb 'yuqsimu,' and its subject is the Alif, which is the manifest connected nominative pronoun placed for two males—whether they are rational or irrational—and 'bi-Llahi' is a preposition and its object related to 'yuqsimani'.
The estimation is: they deserved, meaning they committed some act that necessitated a sin, such as distortion or betrayal; or the mudaf (the added noun) is omitted and this word stands in its place and takes its grammatical case, and the related part (muta'alliq) of "istahaqqa" is omitted, which is also metaphorical; or the related part of "istahaqqa" is omitted without omitting the mudaf, and the verbal sentence, including the subject and the object, is in the nominative position to serve as the predicate (khabar) for "anna," and it, along with its subject and predicate, is interpreted as a gerund (masdar) to be in the genitive case by "ala," and the preposition and the genitive are in the nominative position to serve as the pro-agent (na'ib fa'il) for "athara," and it, along with its pro-agent, is the condition of "in" and is in the jussive position because of it.