Rashi says that we keep 2 days because of uncertainty in case beth din forgot the secret of how to determine rosh chodesh.
However, we learned that if beth din made an error in establishing rosh chodesh or even deliberately violated the rules, the month is nevertheless established as beth din decrees.
How then can you get into a situation where if beth din forgot the secret of establishing rosh chodesh and made an error one could come to eat chametz on Pesach?
Michael S. Winokur, Forest Hills, New York, U.S.A.
1) I posed this question to a leading Talmid Chacham and he replied on the spot that the Halachah that if the Beis Din makes an error, the month is still established as the Beis Din decreed, applies only if the month is being established "Al Pi ha'Re'iyah," through the testimony of the witnesses about what they have seen (as in Rosh Hashanah 25a). If the month is established "Al Pi Cheshbon," through calculations, then this Halachah does not apply, so if the Beis Din forgets the secret of calculating Rosh Chodesh, the month cannot be established.
2) However, I looked further into this question and it appears to me that the Din which you mention of "Atem Afilu Shogegin" (Rosh Hashana 25a) -- that the month is established even if the Beis Din errs -- in fact applies whether the month was established through the testimony of witnesses, or whether it was established through the calculations of the Beis Din (both "Al Pi ha'Re'iyah" and "Al Pi Cheshbon"). This differs from what I wrote above.
3) I believe that I have found a proof for this in Tosfos to Rosh Hashana 21a (DH Levi). Tosfos questions the rule of "Atem Afilu Shogegin" from the account in Sanhedrin 12a, that King Chizkiyah added a month to the year ("Ibur Shanah") and asked for mercy on himself for changing the correct date of Pesach. Tosfos asks why did Chizkiyah need to ask forgiveness, if the Halachah is that Beis Din has the power even to change the date deliberately? Tosfos answers that "Atem Afilu Shogegin" applies only in two scenarios:
(a) Beis Din establishes Rosh Chodesh on either the 30th or the 31st day from the last Rosh Chodesh, and thereby makes the month either "missing" or "full" incorrectly.
(b) Beis Din establishes the new month on the basis of false witnesses.
3) The question from Chizkiyah is therefore reconciled because Chizkiyah did not add an extra day to the month, but in fact added an extra month to the year. The Din of "Atem Afilu Shogegin" does not apply to Ibur Shanah, only to Kidush ha'Chodesh (see Tzelach, by the Noda bi'Yehudah, on Maseches Berachos 63b, DH v'Amnam Din).
4) We see from Tosfos that there are two scenarios where Beis Din makes a mistake but the month is still established. Example (a) mentioned above is where they made a mistake with the calculations. Example (b) is where they made a mistake by accepting false testimony. In other words, (a) is referring to "Al Pi ha'Re'iyah" and (b) is referring to "Al Pi Cheshbon." According to this, we have a proof that "Atem Afilu Shogegin" applies both to "Al Pi ha'Re'iyah" and to "Al Pi Cheshbon."
5) I found that the Minchas Chinuch (Mitzvah 4:7, DH veha'Nir'eh) learns explicitly that this is the Peshat in the above Tosfos. He cites the Tosfos and writes, "For the people of Babylonia, according to their calculations, that day was Yom Kippur. Nevertheless, one applies the rule of Atem Afilu Mezidin."
6) As to your original question, I think the answer is as follows. The Din of "Atem Afilu Shogegin" applies when we have an otherwise competent Beis Din that makes a mistake from time to time. However, if the Beis Din forgot the secret of determining Rosh Chodesh, they no longer can be considered a Beis Din for these purposes. They are missing the essential knowledge required by a Beis Din for Kidush ha'Chodesh. This may be compared to a rabbi who forgot the Shulchan Aruch, who no longer can be considered a competent rabbi.
(This is particularly well understood in light of the Teshuvos ha'Rashba 4:254, who writes that the calculations are the most important way to decide when the new month is. When the Beis Din resided in the Beis ha'Va'ad there was a Mitzvah to sanctify the moon through witnesses, but nevertheless the calculations were so important that sometimes different kinds of manouvers were employed to ensure that the testimony of the witnesses complied with what the Sanhedrin knew to be the true calculations.)
In summary, the fact that the month is established as Beis Din decreed, even mistakenly, only applies if the Beis Din is fully qualified.
I posed this question to a Gadol and he answered that the Beis Din cannot be "Amei ha'Artzim" -- they must not be ignorant people.
If people do not learn Torah, and as a result the Beis Din forgets the "Sod ha'Ibur," this means they are Amei ha'Aretz as far as this Din goes. A Beis Din might make an occassional mistake, but if people do not learn Torah and thereby forget their learning, this makes them into ignorant people. Such people certainly may not preside on a Beis Din.
This is similar to part 6 of my earlier reply.