"A society must" in what sense? Some, mostly modern, societies (eg constitutions) sometimes do "define their values" but rarely in the way that you mean. IE, they're defined in regular human terms like justice and stuff. No society that I know of "defines its values" in terms of uber abstract principles that everything else is derivative of.
Some, mostly modernist, occasionally platonist philosophers try to do this... but thats a philosophical exercise.
The way societies actually work is that we have values, because people have values. We rationalise, abstract, deconstruct, cross reference, expand, contract, torture, abandon, repurpose, revise and revisit those values in a never ending process. That is, in fact, what society is.
What you are describing is asimov computer code.