(Part of the) Carnot's theorem: "All irreversible heat engines between two heat reservoirs are less efficient than a Carnot engine operating between the same reservoirs." is proved with irreversible heat engine driving Carnot refrigerator. In the proof (for example M. Zemansky, R. Dittman, Heat and Thermodynamics, 1997, page 175) it is used for efficiency of the refrigerator: η=W/QH, W is work done to refrigerator, QH is heat given to hotter reservoir. But this equation is true for the heat engine, where W would be work done by engine and QH heat taken from the hotter engine. For refrigerator, efficiency, as far as I know, is η=QL/W, where W is work done to refrigerator, QL is heat taken from colder reservoir. Where is my mistake, if any?