Peah 23 discusses the source of all torah being from sinai even what people are mechdaish. There is a great deal of discussion about from what parts of torah one can learn halacha from. We presented a responsa from the Nodah Beyehuda Mahadura Tinyana 161 who discusses a tehuvas harashba and a Tosofos Yom Tov brachos perek 5 mishnah 4. The gemara discusses at length if one can or cannot compare cases to a halacha l'moshe misinai.