But the Rambam did not rule so in chapter three, law 3, and this is his wording: If the fourteenth falls on Shabbat, one searches for the chametz on the night preceding the eve of Shabbat, which is the night of the thirteenth. And he leaves over from the chametz enough to eat from it until four hours on the day of Shabbat, and he places it in a hidden place. And the remainder—he removes it before Shabbat. And if any chametz remains after four hours—he nullifies it, and overturns a vessel over it until the conclusion of the first day of the festival, and removes it. Thus far his words. And so ruled the Tur and the Shulchan Aruch, and such is the common custom. And even though it is against the Mishnah, they relied on that which is stated in the first chapter (13a), as it was taught: If the fourteenth falls on Shabbat, one removes everything before Shabbat... the words of Rabbi Eleazar ben Yehuda of Bartota, which he said in the name of Rabbi Yehoshua... they said: They did not move from there until they established the halacha accordingly. See there. And even though one does not derive halacha from a Mishnah or a Baraita (Niddah 7b, and see there in Rashi and in the Rashbam Bava Batra 130b), and so it is stated in the Yerushalmi (Pe'ah chapter two), nevertheless here, where the Gemara brought the Baraita and said that "they did not move from there until they established the halacha accordingly"—one may infer from it that it is a clear halacha. (However, the Rif has another system in this, and he rules like Rabbi Eleazar son of Rabbi Tzadok that chullin is in its time, and this is like the Sages. And he wrote that because Rabbi Eleazar of Bartota stands like him, see there. And the Ran, and the Beit Yosef, and the Taz subsection 1, and the commentators found difficulty with his words. And we, with the help of Heaven, explained in the introduction to the Haggadah that his words are simple, for he rules like the Sages. And that which he wrote like Rabbi Eleazar son of Rabbi Tzadok—is because regarding terumah the halacha is not like the Sages but like Rabbi Eleazar son of Rabbi Tzadok, because he stands like Rabbi Eleazar of Bartota, for the halacha was ruled like him. And even though the Rif does not rule halacha regarding terumah, nevertheless he cannot write the opposite of the law, and therefore he acted wisely to rule like Rabbi Eleazar son of Rabbi Tzadok. And this is also the intention of the Ran, of blessed memory, and everything they questioned against him is settled. Examine it and you will find it easy.)
אבל לא כן פסק הרמב"ם בפרק שלישי דין ג, וזה לשונו: חל ארבעה עשר להיות בשבת – בודקין את החמץ בלילי ערב שבת, שהוא ליל שלושה עשר. ומניח מן החמץ כדי לאכול ממנו עד ארבע שעות ביום השבת, ומניחו במקום מוצנע. והשאר – מבערו מלפני השבת. ואם נשאר מן החמץ אחר ארבע שעות – מבטלו, וכופה עליו כלי עד מוצאי יום טוב הראשון, ומבערו. עד כאן לשונו. וכן פסקו הטור והשולחן ערוך, וכן המנהג הפשוט. ואף שהוא כנגד המשנה – סמכו על הא דאיתא בפרק קמא (יג א), דתניא: ארבעה עשר שחל להיות בשבת – מבערין את הכל מלפני השבת…, דברי רבי אלעזר בן יהודה איש ברתותא, שאמר משום רבי יהושע… אמרו: לא זזו משם עד שקבעו הלכה כן. עיין שם. ואף על גב שאין למידין הלכה ממשנה וברייתא (נידה ז ב, ועיין שם ברש"י וברשב"ם בבא בתרא קל ב), וכן איתא בירושלמי (פאה פרק שני), מכל מקום בכאן שהש"ס הביא הברייתא ואמרו ש"לא זזו משם עד שקבעו הלכה כן" – שמע מינה דהלכה ברורה היא. (אך להרי"ף שיטה אחרת בזה, ופוסק כרבי אלעזר ברבי צדוק דחולין בזמנן, וזהו כחכמים. וכתב משום דקאי רבי אלעזר ברתותא כוותיה, עיין שם. ונתקשו בדבריו הר"ן, והבית יוסף, והט"ז סעיף קטן א, והמפרשים. ואנחנו בסייעתא דשמיא בארנו בפתיחה על ההגדה דדבריו פשוטים, שפוסק כחכמים. ומה שכתב כרבי אלעזר ברבי צדוק – משום דבתרומה לית הלכתא כחכמים אלא כרבי אלעזר ברבי צדוק, משום דקאי כרבי אלעזר ברתותא, דנפסקה הלכה כמותו. ואף על גב דאין הרי"ף פוסק הלכה בתרומה, מכל מקום היפך הדין אי אפשר לו לכתוב, ולכן התחכם לפסוק כראב"צ. וזהו גם כוונת הר"ן ז"ל, ומיושב כל מה שהקשו עליו. ודייק ותמצא קל.)