Law is a system of rules created by state institutions that form a framework for a peaceful society. These laws are enforced through mechanisms built by the state and sanctions can be imposed when they are broken. The precise definition of law is a matter of longstanding debate.
It is generally agreed that the three primary functions of law are to establish standards, maintain order and resolve disputes. It should also protect liberties and rights. The modern concept of the Rule of Law seeks to safeguard against anarchy and the Hobbesian war of all against all. It is based on the idea that all citizens, including those in government, are considered equal and subject to publicly disclosed legal codes and processes.
The principal sources of law are the written Constitution and statutory code of a country, along with custom and practice in a legal community. The written Constitution provides the basic structure of a state’s governance, while statute code sets out detailed rules for specific fields of law. These rules are supplemented by judicial precedent, which is a key feature of the common law tradition in some countries.
Other sources of law include religious precepts, such as Jewish Halakha and Islamic Sharia. These can provide the basis for more thorough legal systems, but they require further human elaboration through interpretation and analysis (Qiyas and Ijma) and other means such as analogy and consensus, to make them practical and enforceable in contemporary societies.