Professor Ahmed Ibrahim wrote in his book علم أصول الفقه that analogy (القياس) can be used for deduction. However, he enumerates several conditions for a valid analogy,
- The case compared to must not be a special case, e.g., the prohibition of marrying the wives of the Prophet (PBUH) after his death or if they are divorced. Marrying other women cannot be considered analogous to this case.
- If an exception from a general ruling has been made, then analogy to the exception may also be made. For instance, selling unquantified merchandise is prohibited and considered usury (ربا الفضل). However, the Prophet (PBUH) exempted palm trees. He allowed them to be sold with only an estimate of their yield. Grapevines can be considered analogous.
- The case compared to must not have been abrogated.
- The aspect of analogy (وجه القياس) must be obvious, not interpreted. For example, one cannot claim analogy to crime punishments, such as flogging for fornication, since the ruling of God, specifying a hundred floggings, cannot be determined by analysis; it is a mandate from God as is.
Professor Ibrahim finishes with two very important observations. He says that the wisdom (الحكمة) of the rulings of God may not be obvious, so one should not try to guess it and build an analogy case on that. Instead, one should find the contingency
(العلة) associated with the case compared to and when there is a case in question that shares the same contingency, then and only then can an analogy case be made. The ruling of the analogous case then becomes valid or invalid as the contingency is there or not there.
An example of this technique is breaking the fast in Ramadan. The wisdom allowing it is hardship, but hardship is hard to quantify. That's why the contingency of traveling or illness is used instead. Another example is handing over the orphan his money. The wisdom is his maturity, but that is hard to quantify, so puberty is used instead.
Finally, he emphasizes that all of the rulings of the Sharia are meant to benefit people or keep harm away from them. That objective should be alive in the minds of scholars as they use analogy in their deduction.