In the authentic hadith the Prophet (may the Salah and Salam of Allah be upon him) invoked Allah for a deceased man to replace him with a wife better than his. So, is it permissible to say the same supplication if the deceased is a woman? هل يدعى للمرأة في الجنازة بـقول: (اللهم أبدلها زوجا خيرا من زوجها)؟