A Mathematical Approach to Law and Deal Modelling: Legislation and Agreements

This paper presents a new and original first approach to agreement situations as well as to regulations constructions. This is made by giving a mathematical formalization to the set of all possible deals or regulations, such that then, the proximity between them is defined by means of a premetric. Thanks to this mathematical structure that tries to capture the problematic of agreements and regulation modifications, now some questions related to game theory or law are reduced to mathematical optimization problems.


Motivation. The need of going further when making agreements
The objective of legal systems around the world is to regulate people's coexistence ( [21]).This objective gives a central role to the definition and measurement of the legal framework in everyday interactions, as well as to the way in which these norms regulate the behavior of a population.In this sense, over the last decades, a good deal of theoretical and empirical work has been devoted to the task of explaining the compositition of agreements and consensus in a lot of related areas, such as climate change ( [22,24]), goverments coalitions ( [20,25]), cooperation and coordination on social dilemmas ( [23]) among others.Likewise, the evolution of large-scale cooperation in humans has been the focal point of several disciplines in the last few decades ( [3,8,9]).
It is argued that genetic relatedness can explain the emergence of cooperation ( [18]).
However, humans cooperate on vast scales, more substantially than their genetic relatedness allows.Some explanations for this phenomenon include punishment, direct and indirect reciprocity, group competition etc. (see, for instance, [19,26,27]).Furthermore, the socio-economic spectrum in which we live is replete with binding agreements and/or treaties between two or more countries, companies, political parties, etc.
In the international environment, in recent years, there has been a proliferation of free trade agreements, such as the European Union, the Trans-Pacific Partnership Treaty or the Transatlantic Trade and Investment Partnership, and even environmental treaties and protocols such as the Kyoto Protocol.But, what makes some countries sign these treaties and others not?, and what makes countries comply with the agreements or not?Undoubtedly the regulation distance within the agreed agreements and what each participant is willing to accept or renounce makes the difference between signing and not signing.Most of the proposals to solve these differences are based on fragmenting the regulations imposed in the agreements to satisfy the greatest number of participants.[5] note that this type of fragmentation of the legal framework promotes the multiplication of international commitments.But, the difference in the starting point of the participants in the treaties may or may not make the agreement a success.
This situation of non-compliance does not only occur in international environments.Within a country's borders, undesirable situations can arise with respect to compliance with national regulations, even in public health situations.One of the great battles of modern jurists and politicians is how we should implement the enforcement of laws.Given an ultimate goal, should we implement all the laws or rules to achieve it simultaneously, or does a gradual sequencing in the introduction of the different rules cause the number of non-compliances to decrease?Take for example the recent COVID19 global pandemic case.All countries, even regions, have adopted different measures in both form and timing.All measures have been designed to contain the spread of the virus and/or to control space in hospitals to care for the sick.The way these measures have been implemented has varied widely, and it has been found that even in this pandemic situation, the measures adopted have been breached by many residents.Perhaps a gradual implementation of the different measures could have resulted in less non-compliance, thus achieving greater effectiveness of the measures adopted.
In this work, we show that phasing in the rules to be complied with can achieve the objective at a lower cost than if they were all implemented from the beginning.The higher or lower cost depends on the proximity between rules, which is defined in the paper (mainly through the probability and 'severity' of breaking a rule), and which also allows us to evaluate what kind of agreements or treaties can be signed by the participants, taking into account this proximity between the different rules or laws.
Consequently, social scientists, practitioners and legal researchers have been concerned with developing the legal framework of people.Although much work has been done to develop the regulatory character of the legal system, we see that little has been done in terms of developing methods to measure the status of people's legal system.Therefore, we see a need to measure and quantify this legal environment and the distance between existing laws and agreements.The aim of this paper is, using a new information theory approach to compare and evaluate different legal measures, to derive some focal measures of the effect of the legal framework on individuals and populations.In addition, in this paper, we contribute to the literature by analyzing how the proximity between diferent positions and norms in agreements affects the evolution of consensus or adoption of the agreement.
The goal of the present work is to introduce a tool in order to measure the proximity or 'distance' between games, regulations or deals.One of the main aims of this study is to know how to change the rules of a game in order to achieve a more efficient equilibrium.There may be different manners or paths in order to change the law from an initial regulation to a final one.Here we construct a tool that indicates which is the path when changing the law, that is, a tool that shows us how we have to make changes in the law in order to arrive to a better regulation or deal, but always minimizing the social resistence to the changes.The second goal of the paper is to achieve the most preferred deal in no-agreement situations.Again, for that purpose a distance function between deals is required.
The introduced technique allows us to achieve the closest agreement-point in case of blocking situation.
As far as we know, there is no previous knowledge on the subject, so this is the first mathematical approach to the problem posed.
The rest of the paper is organized as follows.Section 2 introduces the mathematical tools and notation needed.Section 3 gives a mathematical structure to the problematic of the agreements and regulations, so that then, Section 4 presents some applications through the introduced new approach.A final section of conclusions ends the paper.

Preliminaries: Mathematical tools
In the present section we include some mathematical concepts that shall be needed throughout the paper.These are mainly related to order structures and metric spaces.
From now on X will stand for a nonempty set.
Definition 2.1.A binary relation R on X is a subset of the cartesian product X × X.Given two elements x, y ∈ X, we will use the standard notation xRy to express that the pair (x, y) belongs to R. Associated to a binary relation R on a set X, we consider its negation (respectively, its transpose) as the binary relation R c (respectively, R t ) on X given by (x, y) ∈ R c ⇐⇒ (x, y) / ∈ R for every x, y ∈ X (respectively, given by (x, y) ∈ R t ⇐⇒ (y, x) ∈ R, for every x, y ∈ X).We also define the adjoint R a of the given relation R, as A binary relation R defined on a set X is said to be: In the particular case of a nonempty set where some kind of ordering has been defined, the standard notation is different.We include it here for sake of completeness, and we will use it throughout the present manuscript.Definition 2.2.A preorder on X is a binary relation which is reflexive and transitive.An antisymmetric preorder is said to be an order.A total preorder on a set X is a preorder such that if x, y ∈ X then (x y) ∨ (y x) holds.In the case of preorders, it is well known that the corresponding indifference is transitive, i.e., it is an equivalence relation.Given a preorder on X, we shall denote by x ⊲⊳ y when x and y are not comparable, i.e., when ¬(x y) as well as ¬(y x).Definition 2.3.Let ≺ denote an asymmetric binary relation on (X, τ).Given a ∈ X the sets L ≺ (a) = {t ∈ X : t ≺ a} and U ≺ (a) = {t ∈ X : a ≺ t} are called, respectively, the strict lower and upper contours of a relative to ≺.We say that ≺ is τ-continuous (or just continuous) if for each a ∈ X the sets L ≺ (a) and U ≺ (a) are τ-open.
We will denote the order topology generated by ≺ as τ ≺ , and it is defined by means of the subbasis provided by the lower and upper contour sets.
Let denote a reflexive binary relation on (X, τ).Given a ∈ X the sets L (a) = {t ∈ X : t a} and U (a) = {t ∈ X : a t} are called, respectively, the weak lower and upper contours of a relative to .We say that is τ-lower semicontinuous (τ-upper semicontinuous) if for each a ∈ X the sets L (a) (resp.U (a)) are τ-closed.
The concept of τ-(semi)continuity is a key notion when dealing with continuous representations of, not only in the well-known case of total preorders (see [7,13,14]), but also preorders, thus, it is a very common and usually necessary concept in the field of order structures.Now, we include some definitions related to metrics and their generalizations.
Definition 2.4.A metric on a set X is a function d : X × X → [0, +∞) (also called distance) satisfiying the following three properties: There are several generalizations of metrics (see [2,4,17]) relaxing the aforementioned axioms.In our context we shall use the following notions.
A premetric on a set X is a nonnegative real-valued function d on X × X such that : The following proposition is well-known and it warrants that any premetric defines a topology on the set.[2,4,17] Proposition 2.6.Let d be a premetric on X.Then, d induces a topology on X by means of the following open balls, for any r > 0 and any x ∈ X: Finally, we include one statistical distance which quantifies the proximity between two probability distributions.There are several distances defined between probability distributions, in the present paper we shall work with a f -divergence function known as Kullback Leibler divergence.[1,10,11] Definition 2.7.Let p and q be two probability functions on the same event space F .The Kullback Leibler divergence (also called relative entropy) from q to p (or the relative entropy from q to p) is defined by Relative entropy is defined whenever condition is satisfied.The entropy of p is defined by

Comparing regulations and societies
Through the present paper we introduce a tool that allows to quantify negotiations.It gives us a manner to objectify agreements from a theoretical point of view, that could help for impartiality, in particular when there is an 'oracle' or 'institution' that want to achieve an agreement between the agents.This new technique allows us to find the most preferred deal in disagreement situations.Furthermore, if we want to incorporate a regulation by adding rules at different times, this method gives us the best manner or order in wich the rules must be added so that they clash as little as possible with the custom of society (as it is shown in Example 3.14).Thus, we may construct the best (or 'less aggressive') path from a deal to a new one.This may be interesting too in order to keep the consensus.
For these purposes, we need to formalize some ideas by attributing them a mathematical definition.As far as we know, there is no previous knowledge on the subject, so this is the first mathematical approach to the problem posed.
First, let Ω be a set of rules {R i } i∈I called Law, that is used when defining a regulation or legal framework G, which is in fact a subset of Ω.Second, let {A n } N n=1 be a finite family of agents or players, these players will be the signers of the possible deal or the society that lives under the regulation G.The set of rules G, that is, the regulation, will be the sample space Ω G of a probability space, where the events space is the σ -algebra F = P(G), which is the set of subsets of rules of the regulation that could be broken.
If we change a rule, two interesting questions arise: (Q1) What is the probability that the rule will be broken by an agent A? Or, what is the probability that the rule will be broken by n players?
(Q2) Which is the minimum punishment that must be imposed in order to avoid breaking the rule?Or, in other words, how much would have to be compensated in order to guaranty that the rule will be cumplied?
The answer to question 2 would give us the individual cost or severity of enforcing the rule, and with the answer to question 1 we will be able to measure the proximity between the regulation of the deal or game with the habits of the current society of players.
We assume that we have this information at our disposal.From an applied point of view, it may be estimated, or it may be deduced from historical data.In any case, from a theoretical point of view, we will need this information (or the corresponding estimation, or frequencies or approximation).
Furthemore, the answer to both questions may be related.We may think that if a rule is broken usually by plenty of players, then the individual cost or severity must be small (for example, if we are thinking on forbidden smoke somewhere), whereas if a rule is rarely broken (a murder, major tax fraud) then the individual cost is bigger.Hence, this individual cost or severity may be defined by means of the probability of being broken.Now, we formalize the main concepts.
said to be a regulation or legal framework under the Law.For a given regulation G, G itself is a sample space Ω G , where the corresponding events space is defined by the set of subsets F G = P(G).An event x ∈ F G is a set of rules that may be broken (each of one).Thus, for each n ∈ {1, 2, ..., N}, let P n : F G → [0, 1] be the probability of player A n breaking a subset of rules x ∈ F G (i.e., breaking each of the rules involved in x).By means of these probabilities, we define the mean function P: . Thus, the expected number of offenders for a subset of rules in a regulation (that is, for an event)

associated to breaking each of the rules involved in x).
A legal game (or l-game, for short) Ψ G is now a probabilistic space (Ω G , F G , P) associated to a legal framework G (defined under the Law Ω) and a society or family of agents A. The idiosyncrasies of this society A are reflected in the probability functions P. Thus, the same regulation applied on another society B implies a different probability function P ′ .If it is also endowed with a punishment function g, then we say that it is a punished l-game.
From now, Γ denotes the set of all possible l-games that may be defined with a given Law Ω on a society A. Thus, Γ = {(G, F G , P G ) : G ⊆ Ω}, and we shall call it by Game of games.Therefore, when referring to Γ, the Law and the society are assumed to be fixed.We shall say that a rule Then, the expected severity of a punished l-game (per capita) is defined by Thus, the expected severity of the l-game is the sum of the products of the expected ratio of offenders and the individual cost or severety.
The entropy [1,10,11] of a (not necessarily punished) l-game is Thus, the entropy may be interpreted too as the expected severity per capita when g(x) = log( 1 P(x) ), for any x ∈ F G .By continuity, it is assumed that 0 • log(0) = 0 and 0 • log( 1 0 ) = 0. Remark 3.2.(1) Notice that for a given regulation G ⊆ Ω, ∑ x∈F G P n (x) = 1 for each n ∈ {1, 2, ..., N} and, hence, ∑ x∈F G P(x) = 1.Therefore, function P is, in fact, a probability function.In the case where the signers are countries or a few players, P may be defined by means of the individual's probability functions P n (n = 1, ..., N).On the other hand, for the case of regulations that are applied on societies (i.e. with thousands of persons involved), funtion P maybe directly estimated or defined by means of frequency data, without requiring the definitions of the individual's probability functions P n (n = 1, ..., N).It is interesting that, for the first case aforementioned, this function P may be defined with weights, such that the weigth of some players may be bigger than others regarding to the their importance in the game (for example, if we want to weigth a family of countries in a deal by means of their GDP, population, contamination, ...) (2) The (individual) punishment g(x) (for any x ∈ F G ) may be assumed to be in [0, 1], although it can be defined on the set of positive real numbers.It is assumed that g( / 0) = 0, that is, there is no punishment when there are no offenders.
Notice that, if the individual punishment associated to breaking a family of rules is defined by means of the probability function P as log( 1 P(x) ) (such that, the punishment also changes depending on the number of offenders), then the expected severity per capita is defined by the entropy: ).
From now on, we will forget the player's probability functions P n (for each n = 1, ..., N) and we will work just with the (weighted) mean P.
Notice that a legal game consists on a set of rules applied on a society, the idiosyncrasy of that society is reflected in the probability function P. Thus, the l-game arised from a regulation G in a society A may change just by changing the society, i.e., the consecuences of a regulation may differ from one society to another.In this line, we introduce the idea of distance between societies in the spirit of Kullback Leibler divergence.[1,10,11] It will give us the behavior difference between two societies which live under the same regulation.What it works in a society, may fail in another.Definition 3.3.Let Ψ G and Φ G be two legal games with the same regulation but with different societies A and B, which are characterized by a different probability function, p and q respectively.The KL-social divergence from A to B under G (denoted by D G (A||B)) is the Kullback Leibler divergence from q to p, that is, ).
(1) This mathemathical concept of social divergence may be useful when trying to import/export a regulation from one country or region to another.A successful regulation may fail when it is applied in another society.Thus, it may be interesting to measure the proximity between those societies as regards to the regulation.Hence, before trying to apply that new regulation, it may be important to minimize the distance between societies (as regards to the corresponding regulation) by means of an adequate punishment function, awareness campaigns, incentives, education, ...
(2) The idea of KL-social divergence has been defined by means of Kullback Leiber divergence, this explains the initials KL.However, as explained in Preliminaries, there are several divergences or distances that measure how different two probability distributions are from each other.Depending on that selection, we may define one social divergence or another.However, all these distance should satisfy some coherence conditions in order to faithfully reproduce the problem in our mathematical model.
In the following lines we present a distance function that allows us to measure the difference between l-games, in particular, between regulations that are applied on the same society.Before that, we collect a few conditions that should be satisfied by such a distance.By means of these conditions, we want to traslate the main properties of a negotiation or legislation to our mathematical model.Definition 3.5.Let Ω be a Law and A a society.Let G be a regulation in Ω (thus, G ⊆ Ω) and R a rule in Ω \ G.The l-games arised from G and G ∪ {R} are denoted by Ψ and Ψ ′ , respectively.Let d be a distance function on the set of l-games Γ.Then, the following coherence conditions are defined: (C1) The bigger the severity of rule R, bigger the distance from Ψ to Ψ ′ .
(C2) The more likely it is that the rule R will be breached, the greater the distance from Ψ to Ψ ′ .Definition 3.6.Let Ψ 1 and Ψ 2 be two punished l-games defined under a Law Ω associated to two regulations G 1 and G 2 , respectively, with the corresponding probability functions p 1 and p 2 and the punishment functions g 1 and g 2 , respectively.Then, the premetric from Ψ 2 to Ψ 1 is defined by Remark 3.7.(1) First, notice that the premetric function d satisfies the coherence conditions introduced in Definition 3.5.
(3) This premetric fails to be symmetric, however, it can be easily symmetrized as follows: Or, by means of the maximum: (4) However, D as well as D + and D s may fail to satisfy the triangle inequality.Therefore, we conclude that Ψ 3 ⊑ sub Ψ 1 , that is, ⊑ sub is transitive and, hence, it is a preorder.
Example 3.14.Let {A i } i=1,2,3 be a set of three players, which are the herdsmans of the classical communal example.Each herdsman has a single cow, which need 90$ for feed.The communal can feed two cows, but if the three of them try to feed there, then it is not enough and each herdsman has an additional cost of 50$.
Initially there is no rule, so that all the players decide to bring their cow to the communal.Hence, the equlibrium state is (−50, −50, −50).In order to improve this situation, the following rules are studied: R 0 : No rule.R 1 : A tax (33$) to any user.R 2 : A raffle (one cannot use it).R 3 : A compensation (66$ for any one who reject to use it).Therefore, the Law is Ω = {R 1 , R 2 , R 3 }.Any combination of the aforementioned rules is also possible, hence, we have 2 3 = 8 possible regulations, denoted by G i ⊆ Ω.Under each regulation a new equilibrium state may arise.
We may assume that the punishment for breaching R 1 (i.e., for using the communal without paying the tax) is g(R 1 ) = 100$, the punishment for breaching R 2 is also g(R 2 ) = 100$, and for R 3 is g(R 3 ) = 166$.
The theoretical punishment for breaching a law that is not included in the regulation is 0 (this assumption is needed for the construction of the distance).Now, we estimate the probability of breaching each law.We may do that for each player or just as an average or mean.Here we did for each player, assuming that one of them is very lawful, the second one no so much, and the third one is a cheat.With the probabilities assumed for each player, the corresponding mean (without weights, since we assume that all the players are equally important ( In the table above notice that the probability assigned to / 0 is the probability of breaching no rule.On the other hand, in some context the probability of breaching a single rule (or a subset of rules) is 0, since it implies to breach another one.For instance, under regulation F, if a player breaks the compensation rule, it means that (s)he is using the communal as well as (s)he is not paying the tax (here we assume that it is buroucratically impossible to ask for compensation as well as pay the tax), thus, (s)he is not breaching the compeansation neither the tax, but it is breaking the set of rules {tax, compensation}.In any case, although the probability of breaching the single rule is 0, the corresponding punishment exists (at least theoretically, and it will be used when defining distances).
With the these data, the distances between regulations (as defined in Definition 3.6) have been illustrated in the graph of Figure 3   Thanks to the mathematical approach to those questions related to regulations and deals, now the corresponding decisions may be chosen by answering optimization problems.In the present section some of these questions and solutions are given.

First application: The shortest path, the legal gradiant
In the present section we show how to change the rules of a game in order to achieve a more efficient equilibrium.There may be different manners or paths in order to change the law from a initial regulation to a final one, but some of them may be better than others when we want to minimize the social resistence to the changes.
As it was shown in the section before, the set of all possible deals is a complete and weighted and directed graph of 2 |Ω| = |P(Ω)| nodes, where each node is a deal (i.e. a subset of Ω) and each edge (G 1 , G 2 ) is weighted by the value determined by the function D(G 2 , G 1 ).If D is symmetric, the the graph can be considered undirected.
Therefore, our political problem of legislating while minimizing social resistance is just the well-known problem of finding the shortest path between two vertices in a graph such that the sum of the weights is minimized.[16] Example 4.1.From Figure 3 of Example 3.14, we may observe that, if we want to arrive to regulation H by adding rules one by one from A, then any possible path is longer (i.e.worst, since the conflict with respect to the previous situation is bigger) than the (shortest) path (A, D, G, H), whose length is 12'91, whereas the length of the second shortest path (A,C, E, H) is 34 ′ 422 (and the third one would be (A, B, G, H), with length 46 ′ 5).Thus, with the assumed data (mainly, the probabilities and the punishment) the compensation must be the first rule to be introduced.

Second application: Searching agreement and consensus
When making agreements between N players, each player has a preference on the possible agreements that may be agreed.The distance presented may be a tool in order to achieve a deal, arriving to an 'intermediate' deal between the preferences of the players.
Returning to the previous case illustrated in Example 4.1, we present the following simple case: Example 4.2.From Figure 3 of Example 3.14, we may observe that, for example, if in the region where the communal lies there are two main political parties, such that one of them wants to introduce the regulation H for the communal, whereas the other prefers to continue with no regulation, then, the deal D as well as G could be the midpoint between these two regulations.
Suppose that in a negotiation there are N players that do not approach positions, and such that each player n has a family of most preferred deals {G * n k } k=1,...,m n (arguing on the set of all possible regulations on Ω).
In this blocking situation, we may wonder which is the minimum distance r ∈ R such that B r (G * n k )) = / 0, as well as it satisfies an optimal condition with respect to the player's preferences, in case they exist.Now we are just searching that deal which is as closest as possible to all the most preferred options.Once we know where that meeting point is, then we can apply the study presented in Subsection 4.1 in order to make the path from the initial deal to that closest deal.Now, we assume that each player A n has a preference n (for each n = 1, 2, ..., N) on the set of all possible games {G : G ⊆ Ω} = P(Ω).We assume that each preference n is a preorder.The goal of the present section is to achieve an optimal deal for disagreement situations.For that purpose, the following concept is defined.Now, we introduce some interesting concepts for the study of negotiation problems.Definition 4.4.We shall say that a signer of a deal G is a r-signer (with respect to a metric D), with r ≥ 0, if she agrees to sign any other deal G ′ such that the distance from G to G ′ is smaller than r, that is, D(G ′ , G) < r.The value of r is said to be the deal threshold of the signer.
A Game of games Γ is said to be a r-step Game of games if D(Ψ 1 , Ψ 2 ) ≥ r, for any Given a r 1 -step Game of games, a r 2 -signer is said to be stubborn whenever r 2 < r 1 .And it is said to be a boycotter if r 2 = 0. Thus, an sttuborn player is not going to sign any other deal except his/her most preferred options.A boycotter is a player that sign nothing.Example 4.5.In the case illustrated in Example 4.1, the length of each step in the path (A, D, G, H) is at most 166/30, thus, any player with a deal-threshold bigger than this value would accept the deal.
On the other hand, there is no path from A to H such that the length of each step is smaller than that value.Thus, consensus would be possible over time whenever all the player are r-signers, with r ≥ 166/30, for each step carried out at the time.
The following concept introduces the idea of compatibility between the agent's preference and the distance, in the sense that the closer a l-game is to the maximal elements (with respect to the preference relation), the more preferred it is.Definition 4.6.Let Ω be a finite set of possible rules and A = {A n } N 1 a finite set of players with their corresponding preferences n on P(Ω) (for each n = 1, 2, ..., N).For each n = 1, ..., N, we denote by M n = {G * n 1 , ..., G * n mn } the maximal elements of P(R) with respect to n .Let D be a distance function on P(Ω).We say that the preferences and the measure D are compatible if for any maximal chain C in (P(Ω), n ) and any G 1 , G 2 ∈ C the following condition holds true: where G C n is the maximal element of C with respect to n .
Remark 4.7.Notice that given a preference n and a compatible distance D, it may hold that min{D(G * n k , y)} k=1,...,m n < min{D(G * n k , x)} k=1,...,m n as well as y ≺ n x, for some x, y ∈ P(Ω).
In order to achieve that Pareto optimal deal, we will use a compatible distance on the set of games, that is, a distance such that the player's preferences are lower semicontinuous.Anyway, even in case of no preferences, we may apply this method just arguing on distances, since we may assume that the player's preferences are empty and, hence, lower semicontinuous.
First, for each player's preference, we construct the corresponding compatible linear extension.Definition 4.8.Let Ω be a finite set of possible rules and A = {A n } N 1 a finite set of players with their corresponding preferences n on P(Ω) (for each n = 1, 2, ..., N).Assume that these preferences are compatible with respect to a distance D.
The distance linear order D n for a player A n is defined as follows (for any n = 1, ..., N): The proof of the following proposition is straightforward.
Proposition 4.9.The distance linear order is a total preorder.Theorem 4.10.Let Ω be a finite set of possible rules and A = {A n } N 1 a finite set of players with their corresponding preferences n on P(Ω) (for each n = 1, 2, ..., N).Let D be a distance on P(Ω).Let M n = {G * n 1 , ..., G * n mn } be the maximal elements of P(Ω) with respect to n .
If n is τ U -lower semicontinuous with respect to the topology defined as The distance linear order < D n is a linear extension of ≺ n .
2. The preference n and the distance D are compatible.
Proof.(1) Let x, y ∈ X = P(Ω) such that x ≺ n y.Since n is τ U -lower semicontinu- ous, y ∈ U = X \ L n (x) ∈ τ U , whereas x / ∈ U. Thus, there exists a radius r > 0 such that ..,m n and thus, x < D n y. (2) Let x, y ∈ X = P(Ω) be such that x ≺ n y and G * ∈ M n the maximal element of a maximal chain C containing x and y.By reduction to the absurd, suppose that there is Thus, F = X \ U is closed and y ∈ X \ U. Since the preorder n is τ U -lower semicontinuous, L n (y) is contained in F and, hence, x ∈ L n (y) ⊆ F.
Therefore, x / ∈ ≤ n .Suppose that there is another element x ∈ X = P(R) such that M ≺ n x for some n ∈ {1, ..., N}.Since < n extends ≺ n , then it holds true that M < n x.On the other hand, M is a maximal element of N n=1 ≤ n , therefore, there is at least one index k ∈ {1, ..., N} such that x ≺ k M (otherwise M ⊏ x and, hence, M is not maximal, arriving to a contradiction).Thus, M is a Pareto optimal deal.Finally, according to Theorem 4.11, in a disagreement situation where the preferences are τ U -lower semicontinuous, we may find the set of all Pareto optimal deals.Then, by means of the distance, we may choose that Pareto optimal deal which is also the closest from the most preferred deals, according to each player's preference.This motivates the following definition.Definition 4.12.Let Ω be a finite set of possible rules and A = {A n } N 1 a finite set of players with their corresponding preferences n on P(Ω) (for each n = 1, 2, ..., N).Assume that these preferences are compatible with respect to a distance D. Let ≤ n be the distance linear extension of n , for each n = 1, ..., N. Remark 4.13.In the study above, we have treated all players equally, symmetrically, regardless of their flexibility in reaching agreements.However, it can be approached asymmetrically, building balls of larger or smaller radius depending on the flexibility of each player.This and other questions are left for future works.

Conclusions
The main goal of this work is to present a new and original breaking mathematical approach for agreement situations as well as for regulation modifications.The present paper presents the mathematical formalization of several concepts in the field of regulations, negotiations and agreements in the context of a society or a family of agents, as well as a mathematical structure that tries to capture the nature of some of these phenomena.As a consequence, several problems related to agreements, negotiations, regulations,... may be studied and solved just as mathematical optimization problems.This work is just a first new approach.It gives a mathematical model for negotiations and regulation constructions, as well as for comparison of societies.However, this model may increase its complexity for other types of problems.

Theorem 3 . 8 .
The distance function D is a premetric on Γ and, hence, it defines a topology τ D on the set.The distance functions D + and D s are symmetric premetrics on Γ and, hence, each of them defines a topology (τ D + and τ D s , respectively) on the set.Proof.It is straighforward to check that D is in fact a premetric and, therefore, D + and D s are symmetric premetrics on Γ.Hence, by Proposition 2.6, they define a topology on Γ by means of the corresponding open balls.

Figure 1 :
Figure 1: The graph associated to all the possible regulations for the communal and the corresponding distances.

4
Applications: law modifications and no-agreement situations

Definition 4 . 3 .
Let Ω be a finite set of possible rules and A = {A n } N 1 a finite set of players with their corresponding preferences n on P(Ω) (for each n = 1, 2, ..., N).A deal G o ⊆ Ω is said to be a Pareto optimal deal if for any other deal G, G o ≺ m G implies G ≺ n G o , with n, m ∈ {1, ..., N}.
G * n k ) = U and hence, in particular x / ∈ B r (G * ) arrived to the desired contradiction.Theorem 4.11.Let Ω be a finite set of possible rules and A = {A n } N 1 a finite set of players with their corresponding preferences n on P(Ω) (for each n = 1, 2, ..., N).Assume that these preferences are τ U -lower semicontinuous.Let ≤ n be the distance linear extension of n , for each n = 1, ..., N.Then, the maximal elements of ⊑= N n=1 ≤ n are all the Pareto optimal deals.Proof.Let M be a maximal element of N n=1

A
maximal element G * of N n=1 ≤ n is the Closest Pareto optimal deal if max{D(G * n k , G * )} k=1,...,m n ≤ max{D(G * n k , G)} k=1,...,m n ,for any other maximal element G of N n=1 ≤ n . .