Once, a complaint was lodged in the court of Ali by a man that the cow of another person had killed his ass. Ali summoned the owner of the cow and asked him to offer his defense if any. He said that as a matter of fact the ass had attacked the cow first and the cow had killed the ass in retaliation. Ali asked the owner of the cow, "Where were you when the ass attacked the cow?" He said that he was driving the cow. Then he asked the owner of the ass, "Where was the ass at the time?" He said that it was tied. Addressing the owner of the cow Ali said that as the ass was tied, and the cow was untied. His plea that the ass had first attacked the cow was untenable. He accordingly decreed that the owner of the cow should compensate the owner of the ass.
"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari