Reference for Sukkah 4:2
לוּלָב שִׁבְעָה כֵּיצַד, יוֹם טוֹב הָרִאשׁוֹן שֶׁל חָג שֶׁחָל לִהְיוֹת בְּשַׁבָּת, לוּלָב שִׁבְעָה, וּשְׁאָר כָּל הַיָּמִים, שִׁשָּׁה:
Lulav — seven. How so? If the first day of the festival fell out on Shabbath, lulav — seven. [For the first day (of the festival) overrides Shabbath, it having a basis in the Torah (for taking the lulav even) in the borders (i.e., outside of the Temple), viz. (Leviticus 23:40): "And you shall take for yourselves on the first day"]. All the other days, six. [If the first day of the festival falls out on any of the weekdays, so that Shabbath falls out on Chol Hamoed, it does not override. And even though all seven days obtain in the Temple by Torah law, the sages established their decree (against taking the lulav) for the other days of the festival, since they have no Torah basis (for taking the lulav) in the borders (on those days). And, in truth, even today the taking of the lulav should override Shabbath on the first day of the festival; but because we are not expert in the fixing of the New Moon, so that it (that day) may not be the first day of the festival, we do not override the Sabbath on the basis of a possibility. And in taking it, there is no (Torah proscribed) Sabbath labor, but merely the moving of it. (Still, it is forbidden) lest he take it in his hand and go to an expert to learn the blessing or the order of the shakings (na'anuim) and come to carry it four cubits in the public domain. And this is also the reason that we do not blow the shofar or read the Megillah (on Shabbath)].