But regarding the essence of the matter, it is very astonishing, for this is all according to Rav, but according to Shmuel and Rabbi Yochanan in Eruvin it is not so, and the halacha follows Rabbi Yochanan over Rav, and all the more so when Shmuel is together with Rabbi Yochanan. And it appears in my humble opinion that the law is with the Rambam, for indeed it is difficult why the Shas in Shabbat troubled itself to search for a reason for this ruling of Rav, for in Eruvin the reason was explained that we decree lest one come to take out vessels of the houses. Rather, certainly the two sugyot do not contradict one another at all, and the reason in Shabbat—everyone admits to it, and there is no disputer in the matter. And that of Eruvin—it is a different matter. And that is, that the reason in Shabbat is only if all the courtyards made an eruv with the houses, and the mavoi remained without courtyards. But if some of them made an eruv and some of them did not make an eruv—behold there are still houses and courtyards from those that did not make an eruv, and in such a case the passage in Eruvin is dealing, and the Rambam's intention is also when all of them made an eruv, as is clear from his wording. But when some of them made an eruv—the Rambam admits that one may carry, and we do not fear lest one come to take out vessels of the houses, like Shmuel and Rabbi Yochanan. And there is clear proof for this, for behold in chapter 3, law 19, he ruled explicitly like Shmuel and Rabbi Yochanan, that whether they made an eruv or did not make an eruv—they are permitted, as we transcribed his wording above, siman 372, section 4, see there. (And I am very astonished at the Tur and Shulchan Aruch and the Acharonim, for according to their words the Rambam would contradict himself from chapter 3 to chapter 5. And know, that according to the reason of the Rambam, if the mavoi is permitted by a tzurat hapetach—it is permitted, and so wrote the Magen Avraham, that with a tzurat hapetach one does not need houses and courtyards. However, that which the Magen Avraham wrote that even with two strips it is permitted—I do not know, for if its length is greater than its width—behold it is not judged as a courtyard but as a mavoi, and it requires a tzurat hapetach, and delve into this.)
אבל בעיקר הענין מאד תמוה, דהא זהו הכל לרב, אבל לשמואל ורבי יוחנן בעירובין אינו כן, והלכה כרבי יוחנן לגבי רב, וכל שכן בדאיכא שמואל בהדי רבי יוחנן. ונראה לעניות דעתי דהדין עם הרמב"ם, דבאמת קשה למה טרח הש"ס בשבת לחפש טעם על הא דרב, הא בעירובין נתבאר הטעם דגזרינן דילמא אתי לאפוקי מאני דבתים. אלא ודאי דשני הסוגיות אין סותרות כלל זה לזה, והטעם דשבת - הכל מודים בו, ואין חולק בדבר. וזה דעירובין - הוא ענין אחר. והיינו דהטעם דשבת אינו אלא אם כן כל החצרות עירבו עם הבתים, ונשאר המבוי בלא חצרות. אבל אם מקצתן עירבו ומקצתן לא עירבו - הא עדיין יש בתים וחצרות מאותן שלא עירבו, ובכהני גווני מיירי הך דעירובין, והרמב"ם כונתו גם כן כשכולן עירבו, כמבואר מלשונו. אבל כשמקצתן עירבו - מודה הרמב"ם דמטלטלין, ולא חיישינן דילמא אתו לאפוקי מאני דבתים, כשמואל ורבי יוחנן. וראיה ברורה לזה, שהרי בפרק ג' דין י"ט פסק להדיא כשמואל ורבי יוחנן, דבין עירבו ובין לא עירבו - מותרים, כמו שהעתקנו לשונו לעיל סימן שע"ב סעיף ד' ע"ש. (ומאד תמיהני על הטור וש"ע והאחרונים, דלדבריהם יסתור הרמב"ם את עצמו מפרק ג' לפרק ה'. ודע, דלטעם הרמב"ם אם המבוי ניתר בצורת הפתח - מותר, וכן כתב המג"א, דבצורת הפתח אין צריך לבתים וחצרות. אך מ"ש המג"א דגם בב' פסין מותר - לא ידעתי, דאם ארכו יתר מרחבו - הרי אינו נדון כחצר אלא כמבוי, וצריך צורת הפתח ודו"ק)