The Noda B'Yehudah has a famous tshuvah discussion a father who passed away on Erev Pesach, leaving chameitz b'yerusha to his children. In the middle of the tshuvah he addresses this Rambam (see previous post). Unlike most achronim (see Magid Mishne) who rejected the idea that the Rambam really held that there was an issur of bal yera'eh on erev pesach, the N.B. writes this this indeed is the Rambam's opinion. He bases this chiddush on the assumption that once we have a gezeirah shava of "se'or-se'or" from bal yera'eh to bal yimatzeih (see Pesachim 5), we also employ the same limud to connect "se'or" in the pasuk "tashbisu se'or m'bateichem" to these lavim. All three mitzvos - tashbisu, bal yera'eh, bal yimatzeih - always go hand in hand! Not only does this explain why there is bal yera'ah on Erev Pesach, but it answers another fundemental question: the mitzva of tashbisu is stated only by Erev Pesach - how do we know it applies during the duration of the chag? Answers the N.B., if bal yera'eh applies for all seven days, then tashbisu automatically goes hand in hand with it.
Based on this, the machlokes Rambam and Ra'avad works l'shitasam. The Ra'avad paskens like R' Shimon (daf 28) that there is no issur lav on chameitz until nightfall of Erev Pesach; the Rambam, however, paskens like R' Yeshudah that there is a lav from after chatzos. The Rambam l'shitaso holds that the gezeirah shavah of "se'or" extends bal yera'eh down to chatzos as well. The Ra'avad l'shitaso holds that once we establish that the lav of "lo tochal" applies only at nightfall, the hekesh between the lavim limits bal yera'eh to nightfall and overrides the gezeirah shavah . [I am not clear why that should be so].
The Rambam opens each section of his halachos with a heading listing the mitzvos that apply in that section. In the opening to Hil Chameitz u'Matzah, the Rambam lists the lav of "bal yera'eh" as applying for the seven days of Pesach. The Rambam l'shitaso is difficult, as he seems to tacitly grant the Ra'avad's point and clinh the argument in favor of the Magid Mishne's reading of the Rambam which assumes that bal yera'eh does not apply before the seven days of Pesach start! The N.B. brilliantly writes that the Rambam in his heading is simply reflecting his "minyan hamitzvos", the count of the mitzvos that apply to that section. The Rambam in his Sefer haMitzvos teaches that anything learned through a derasha of torah sheb'al peh cannot fomally be counted as a mitzvah. Therefore, even though bal yera'eh does apply on Erev Pesach, since that is derived from a gezeirah shavah, it cannot be included as part of the minyan hamitzvos.
As to how this applies to the practical question of the yorshim - stay tuned...