Perhaps by distinguishing between de facto and dejure, you can get a better handle on the difference between “real law” and “theoretical law.”
A de facto government, for example, can do virtually everything a legitimate and constitutionally established government can do. The biggest difference between the two is that the former exists in actuality or reality, just not yet according to a duly sanctioned constitution which spells out in detail the philosophy of how the government will run and the laws by which it will govern.
When that constitution is officially sanctioned and becomes the “law of the land,” the de facto government becomes a dejure government, meaning simply according to law, by right, and legal.
Under South Africa’s dejure policy of segregation, three categories of citizens (viz., colored, Indian, and Black) did not enjoy all the rights and responsibilities of full citizenship that the fourth category (viz., whites) could enjoy by simply being born white.
In the American South, in the years following the Civil War and up to the mid-1960s, Jim Crow laws at the state and local levels enforced dejure racial segregation according to the philosophy of “separate but equal.” Blacks and whites in those days were surely separate by virtue of segregation in public schools, public places, public transportation, restroom facilities, restaurants, and even at public drinking fountains, but they were far from equal! “Jim Crow” institutionalized a number of economic, educational, and social disadvantages for Blacks.
In the North, however, racial segregation and inequality were primarily de facto phenomena, and the patterns of segregation in such areas as housing and employment were enforced not by federal, state, or local governments, but by private covenants, bank-lending practices, and discriminatory labor union practices.
Not until the U.S. Supreme Court case Brown v. Board of Education in 1954, the Civil Rights Act of 1964, and the Voting Rights Act of 1965, did Blacks nationwide begin to enjoy the full rights and responsibilities of citizenship.
In conclusion, a law, to be a law, does not necessarily have to be codified to wield the power of law. By the same token, a codified law does not necessarily have any wielding power if a critical mass of citizens are not willing to enforce it or be governed by it! Both "real laws" and "theoretical laws" provide a people with standards of sanctioned behavior. Whether they choose to live by those standards is an entirely different matter!