Hotlling lemma :Let Y(p) a firm's net supply function in terms of a certain good's price (p). Then:Y(p)= dΠ(p)/dp, for Π the profit function of the firm in terms of the good's price, assuming that p>0 and that derivative exists.
hotelling lemma: if the pi is the price of the out put, then dΠ(p)/dp get the supply function; then if the pi is the price of input, then dΠ(p)/dp can get the demand fuction.