And there is a question regarding this: why should the oath not take effect? For behold, we establish there that with an inclusionary oath, the oath takes effect, such as one who swears that he will not eat matzah the entire year and also on the nights of Pesach; since it takes effect regarding the entire year where there is no mitzvah, it also takes effect by inclusion regarding Pesach. If so, here too, if he had sworn regarding yibbum alone, the oath would have taken effect, and this is not considered swearing to nullify a mitzvah since it is possible through chalitzah. Similarly, if he swore regarding chalitzah alone, the oath takes effect since it is possible through yibbum. If so, since it takes effect on one, let it also take effect on the other by inclusion. And the answer to this is that it is not similar to there; for there, he included in his oath an absolute permission, such as matzah during the rest of the year where there is no mitzvah at all. But here, both chalitzah and yibbum are a mitzvah, for the Torah obligated him to remove the bond of yibbum through one of the two, and he swore that he would not release the bond through either of them; behold, this is exactly swearing to nullify a mitzvah. To what is this comparable? To one who swears that he will not recite kiddush, neither over wine nor over bread; would we say that since it would have taken effect on one of them, it is not considered swearing to nullify a mitzvah? (Rivash, siman 159). Furthermore, inclusion does not apply here since the actions are not equal, for chalitzah is for distancing and yibbum is for drawing near; it is like one who swears not to eat matzah on the nights of Pesach and not to go up to the roof, where it is not applicable to say that since it takes effect regarding going up to the roof, it also takes effect regarding the eating of matzah. And here it is the same, for inclusion only applies to equal actions, such as not eating matzah all year and on the nights of Pesach, and the like (ibid.). Furthermore, there are those who say that an inclusionary oath only takes effect when he did not mention the mitzvah explicitly, such as when he said not to eat matzah all year; but if he specified the mitzvah by itself, such as saying not to eat matzah all year and on the nights of Pesach, it does not take effect (Tosafot, Shevuot 24a, s.v. "Ella"). And according to this opinion, it is obvious that here it does not take effect.
ויש בזה שאלה ולמה לא תחול השבועה והרי קיי"ל שם דבכולל חיילא השבועה כגון שנשבע שלא יאכל מצה כל השנה וגם בלילי פסח מיגו דחיילא על כל השנה דאין כאן מצוה חיילא נמי בכולל על פסח וא"כ ה"נ אם היה נשבע על היבום לבד היה השבועה חלה ואין זה נשבע לבטל את המצוה דאפשר בחליצה וכן אם נשבע על חליצה לבד חלה השבועה דאפשר ביבום וא"כ כיון דחלה על אחת ליחול גם אאידך בכולל והתשובה לזה דלא דמי לשם דבשם כלל בשבועתו היתר גמור כמו מצה בכל השנה דאין בזה מצוה כלל אבל הכא בין חליצה בין יבום מצוה הוה שהתורה חייבה עליו לסלק זיקת היבום באחת משתיהן והוא נשבע שלא יפטור את הזיקה באחת משתיהן הרי זהו ממש נשבע לבטל את המצוה הא למה זה דומה לנשבע שלא יקדש לא על היין ולא על הפת האם נאמר כיון שעל אחת מהן היתה חלה לא הוה נשבע לבטל את המצוה (ריב"ש סי' קנ"ט) ועוד דכאן לא שייך כולל כיון דהפעולות אינן שוות דחליצה הוא לריחוק ויבום הוא לקירוב והוה כמו שנשבע שלא לאכול מצה בלילי פסח ושלא לעלות על הגג דלא שייך לומר מיגו דחיילא על עליית הגג חיילא נמי על אכילת מצה וה"נ דכוותיה דכולל לא שייך רק בפעולות שוות כמו שלא לאכול מצה בכל השנה ובלילי פסח וכיוצא בזה (שם) ועוד די"א דבכולל לא חיילא אלא כשלא הזכיר המצוה בפירוש כמו כשאמר שלא לאכול מצה בכל השנה אבל אם פירש המצוה לבדה כגון שאמר שלא לאכול מצה בכל השנה ובלילי פסח לא חיילא (תוס' שבועות כ"ד. ד"ה אלא) ולדיעה זו פשיטא דהכא לא חיילא: