Sanhedrin, Perek 3, Mishnah 4. This Mishnah details the relatives who are invalid to testify and serve as judges. The foundation of these laws lies in a series of complex derivations that the Gemara discusses, which are based on the verse, "Fathers shall not be put to death because of sons, and sons shall not be put to death because of fathers." Since the Torah teaches elsewhere that sons are not punished for the sins of their fathers and vice versa, the verse here is interpreted differently: Fathers are not put to death based on the testimony of their sons, and sons are not put to death based on the testimony of their fathers. The repetition in the verse, as well as the plural forms "fathers" and "sons," provide fertile ground for derivations. We will not go through all the steps of the derivation, but ultimately the Mishnah lists ten family relationships - and actually even more than that, as will become clear at the end.
"Ve'eilu hen hakerovin" - And these are the relatives:
"Aviv" - His father.
"Ve'achiv" - And his brother.
"Va'achi aviv" - And his father's brother, who is his paternal uncle.
"Va'achi imo" - And his mother's brother, a second type of uncle.
"Uva'al achoto" - And his sister's husband, who is his brother-in-law; this is one type of brother-in-law.
"Uva'al achot aviv" - And the husband of his father's sister, a third type of uncle.
"Uva'al achot imo" - And the husband of his mother's sister, a fourth type of uncle.
"Uva'al imo" - And his mother's husband, meaning his stepfather.
"Vechamiv" - And his father-in-law.
"Vegiso" - And his brother-in-law. Another brother-in-law was already listed above, and there are three ways in which a person becomes a brother-in-law to another. Here the reference is even to the most distant of them: his wife's sister's husband. That is, two men who married two sisters are brothers-in-law to each other, and they are invalid to testify about each other.
In addition to the list of ten, the Mishnah adds: "Hen uveneihem vechataneihem" - Those ten, as well as their sons and their sons-in-law. Incidentally, it can be noted that at each and every stage, a person's wife is considered like him, and therefore the sons-in-law are treated like sons.
The Mishnah adds one more person: "Vechorgo levado" - And his stepson alone, meaning that if he married a woman who already had a son, he too is considered a relative. However, his law is "alone" - and not the generations that follow him. This is the furthest limit: only up to the stepson, and not the stepson's son.
The Mishnah of Rabbi Akiva and Mishnah Rishonah:
"Rabbi Yosi omer: zo Mishnat Rabbi Akiva" - Rabbi Yosi says, this is the Mishnah of Rabbi Akiva. This list belongs to Rabbi Akiva, who was a relatively later Tanna, and Rabbi Yehudah HaNasi quotes it here. "Aval Mishnah rishonah" - But Mishnah rishonah. An earlier version preceded it.
It is worth explaining this concept, which is not unique in Shas: Before the definitive Mishnah was written and edited by Rabbi Yehudah HaNasi, each and every Tanna had his own collection of halachos that he would review, and each such collection was called a "mishnah" - from the word for review, to repeat and remember by heart. Therefore, this was Rabbi Akiva's version, and before it, there was an earlier version known as "Mishnah rishonah".
And in this version it states: "Dodo uven dodo vechol hara'ui leyorsho" - His uncle, his cousin, and anyone who is fit to inherit him. Instead of the list of ten with all its combinations of sons and sons-in-law, it listed a person's uncle and his cousin, as well as any person who is fit to inherit the one they are testifying about or whose case they are judging.
The main difference between "Mishnah rishonah" and the Mishnah of Rabbi Akiva is that the mother's side of the family can never inherit. A person's maternal uncle never inherits from him, since if a person passes away, his inheritance passes to his father and never to his mother. Nevertheless, the person himself can inherit from his maternal uncle, since his mother could have been the heir and through her power the inheritance would pass to him - so an asymmetrical situation is created here.
"Vechol hakarov lo be'otah sha'ah" - And anyone who is related to him at that time:
This refers to someone who had a familial relationship at that time. There are two times that must be considered: the time when the incident in question occurred (for example, the time when Reuven struck his fellow, for which the trial is taking place), and the time when the witness delivers his testimony. After all, it is possible that the witness was his brother-in-law, but only entered the family through marriage after the act. The rule is: If he already had this relationship at the time of the act he witnessed, or at the time he delivers his testimony - he is a relative and is invalid. But if he only entered the family afterward, this does not invalidate him.
From here we move to the opposite situation, about which the Mishnah says: "Hayah karov venisrachak - harei zeh kasher" - he was a relative and then became distanced and severed from the family tree, whether due to death or due to divorce. Meaning, this was his uncle or brother-in-law, but the couple divorced or the wife passed away, and he is no longer part of his family - he is valid, provided that he was not a relative at the time of the event and at the time of the testimony.
The opinion of Rabbi Yehudah:
"Rabbi Yehudah omer" - a person had a daughter who passed away, so the husband of his daughter, his son-in-law, was his relative, and once the daughter died, "nisrachak" - he became distanced and severed from the family tree; he is a former son-in-law, so to speak. But if "yesh lo banim mimenah" - children remained from the deceased daughter, meaning that this former son-in-law is still the father of his grandchildren - they are considered connected to each other even though there is no woman connecting them, since this man is the father of his grandchildren. Therefore, "harei zeh karov" - he is a relative, and is invalid. This is the opinion of Rabbi Yehudah, but the halachah does not follow him.