arXiv:2609.06231cs.CYSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.06231

Formalising Grassroots Social Contracts: From Legal Text to Grassroots Platforms

James Golike, Andy Lewis-Pye, Ehud Shapiro

From Legal Text to Grassroots Platforms (Full Version)

James GOLIKEa^{a}, Andy LEWIS-PYEa^{a} and Ehud SHAPIROa,b^{a,b}

a^{a}London School of Economics and Political Science

b^{b}Weizmann Institute of Science

Abstract. Almost two centuries ago Pierre-Joseph Proudhon envisioned a social contract that is (1) an agreement of man with man; (2) reciprocal; (3) imposing no obligation upon the parties except that which results from their personal promise; (4) subject to no external authority; (5) freely accepted and signed by all the participants; (6) of the nature of a contract of exchange; and a few other conditions. He also envisioned a property of social contracts, analogous to a property of digital platforms we term grassroots: that (i) one could "make a contract with all, as ... with some"; digitally, that a grassroots platform can have multiple instances, and (ii) "each group of citizens ... formed by a like contract ... could thereafter, and always by a similar contract, agree with every and all other groups"; digitally, that independent platform instances may coalesce by mutual consent, possibly into a single global platform instance. We proposed grassroots platforms owned, operated and governed by their participants as a foundation for an equitable and democratic digital realm.

Here we define grassroots social contracts as social contracts meeting Proudhon's six conditions above and that (7) people are free to deal with each other; and (8) there is no external register of people, so people can come to know each other either directly or through people they already know.

We show that a grassroots social contract can be transformed into a working smartphone-based grassroots platform through an abstraction cascade, starting from converting the social contract text to formal act schemas, verified syntactically to be grassroots, and then to volition-guarded multiagent atomic transactions, hitherto the most abstract formalism used to specify grassroots platforms. The abstraction cascade from there to a working app has been described elsewhere.

Act schemas are a formal language for the acts the contract describes, each naming the parties' roles, which of them must will the act, and its precondition and effect at each role, with contract parties determined upon signature. Any contract written in this language meets the eight conditions above, provided it is syntactically grassroots, satisfying : (i) Introduction, that some act can introduce any two willing parties, following which the state of each stores an identifier of the other; (ii) Provenance, that the state of a party stores an identifier of a person only by an act with that person, or with a party whose state stores that identifier; and (iii) Volition, that an act requires the consent of all its parties, unless the undirected graph formed by identifiers stored by the parties is connected.

We prove that the protocol realising a syntactically grassroots contract is grassroots, and volitionally so. To do so, we first prove that politeness — any two parties can always come to interact, and no act joins two instances unless all its participants will it — is sufficient for the protocol over a set of volition-guarded multiagent atomic transactions to be grassroots, and volitionally so: two groups coalesce only when a member of each wills it. We then prove that a syntactically grassroots social contract compiles into a polite set of volition-guarded transactions.

Clauses of a grassroots social contract are of three legal types: A breach of an enforced clause is impossible with a correct implementation of the contract; a breach of an attested or undertaken clause can be taken to court, with non-repudiably signed evidence of the breach in the case of an attested clause. We illustrate the three legal types with two grassroots social contracts, the grassroots social graph carrying signed items and grassroots currencies.

Keywords. grassroots social contract, act schema, compilation, enforcement modalities, provenance, contract specification language, norm-governed systems, contract formation

1. Introduction

Almost two centuries ago Pierre-Joseph Proudhon envisioned a social contract [1, Fourth Study] that is (1) an agreement of man with man; (2) reciprocal; (3) imposing no obligation upon the parties except that which results from their personal promise; (4) subject to no external authority; (5) freely accepted and signed by all the participants; (6) of the nature of a contract of exchange; and a few other conditions, among them that it include all citizens with their interests and that it increase the well-being and liberty of every citizen. In his words, the social contract is "an agreement of man with man"; "essentially reciprocal: it imposes no obligation upon the parties, except that which results from their personal promise of reciprocal delivery: it is not subject to any external authority: it alone forms the law between the parties: it awaits their initiative for its execution"; "freely discussed, individually accepted, signed with their own hands, by all the participants"; and "of the nature of a contract of exchange: not only does it leave the party free, it adds to his liberty; not only does it leave him all his goods, it adds to his property; it prescribes no labor; it bears only upon exchange". He also envisioned a property of social contracts [1, Sixth Study], analogous to a property of digital platforms we term grassroots [2,3,4]: that (i) one could "make a contract with all, as ... with some"; digitally, that a grassroots platform can have multiple instances, and (ii) "each group of citizens ... formed by a like contract ... could thereafter, and always by a similar contract, agree with every and all other groups"; digitally, that independent platform instances may coalesce by mutual consent, possibly into a single global platform instance. In full: "if I could make a contract with all, as I can with some; if all could renew it among themselves, if each group of citizens, as a town, county, province, corporation, company, &c., formed by a like contract, and considered as a moral person, could thereafter, and always by a similar contract, agree with every and all other groups, it would be the same as if my own will were multiplied to infinity. I should be sure that the law thus made on all questions in the Republic, from millions of different initiatives, would never be anything but my law; and if this new order of things were called government, it would be my government." We proposed grassroots platforms owned, operated and governed by their participants as a foundation for an equitable and democratic digital realm [3].

A digital social contract is one realised by software the parties run [5]. We call the mathematical object a protocol and the software realising it a platform. We say a platform realises a contract, and reserve implements for the relation between two adjacent abstractions of the abstraction cascade [6]. A protocol is grassroots when its instances are independent of one another and of every global resource but the net, and can always coalesce, possibly into a single global instance [2,3,4], and a grassroots platform is the software realising a grassroots protocol. The grassroots notion is a formal property of a protocol, recalled in Section 4.

Here we define grassroots social contracts as social contracts meeting Proudhon's six conditions above and that (7) people are free to deal with each other; and (8) there is no external register of people, so people can come to know each other either directly or through people they already know. Our first theorem is that such a contract has the grassroots property: its acts — what clauses describe the parties doing — determine a grassroots platform, in which any two parties may come into relation without requiring anyone's permission, two communities that adopted the contract independently coexist and may later merge, and every participant in any act is a party — no registry that issues identifiers, no log that orders acts, no authority that timestamps them.A social contract is a contract among those who adopt it. Participating in a grassroots platform requires adopting the grassroots social contract that defines it, as participating in a global platform requires adopting an End-User Licence Agreement (EULA). A grassroots social contract is mutual and symmetric among all participants; an EULA is between each person and the platform operator. A friendship or a mutual credit line is an act under the contract between particular parties.

We show contracts for a social network carrying signed speech acts [7,8] and for a currency of personal coins [9] that are grassroots. Not every social contract is. Examples that are not include a contract without coalescences, not allowing two strangers to come into relation; a contract with named third-party control, e.g. where introduction requires a token only a third party can make; and a contract with an act one party takes upon a stranger — an act that changes the stranger's state without their will and requires no prior relation between the two; each fails one of the conditions.

We show that a grassroots social contract can be transformed into a working smartphone-based grassroots platform through an abstraction cascade [6], starting from converting the social contract text to formal act schemas, verified syntactically to be grassroots, and then to volition-guarded multiagent atomic transactions [10], hitherto the most abstract formalism used to specify grassroots platforms. The abstraction cascade from there to a working app has been described elsewhere [6].

A grassroots social contract has two artefacts: a legal text, and a protocol realising it. A clause of the text describes an act, in the sense of a juridical act: a declaration by one or more parties intended to create a legal effect. Act schemas are a formal language for the acts the contract describes, each naming the parties' roles, which of them must will the act, and its precondition and effect at each role, with contract parties determined upon signature. Any contract written in this language meets the eight conditions above, provided it is syntactically grassroots, satisfying : (i) Introduction, that some act can introduce any two willing parties, following which the state of each stores an identifier of the other — records the other, as we say, a friend, the issuer of a coin it holds, the author of an item it was sent; (ii) Provenance, that the state of a party stores an identifier of a person only by an act with that person, or with a party whose state stores that identifier; and (iii) Volition, that an act requires the consent of all its parties, unless the undirected graph formed by identifiers stored by the parties is connected. Conditions (1), (2) and (4) hold of every contract written as act schemas, since every participant in an act is a party and the schemas single out no one, and so does (5), since nobody is bound who has not adopted the contract (Section 3.5); (3) is Volition, (6) and (7) are Introduction, and (8) is Provenance (Section 3.6). The three are decidable, and a checker for them accompanies this paper, at https://github.com/EShapiro2/GLP/tree/main/programs/jurix; it certifies both of the contracts we carry through. The compilation into transactions is defined for contracts meeting them.

We prove that the protocol realising a syntactically grassroots contract is grassroots, and volitionally so (Theorem 10). To do so, we first prove that politeness — any two parties can always come to interact, and no act joins two instances unless all its participants will it — is sufficient for the protocol over a set of volition-guarded multiagent atomic transactions to be grassroots, and volitionally so: two groups coalesce only when a member of each wills it (Theorem 24). We then prove that a syntactically grassroots social contract compiles into a polite set of volition-guarded transactions (Section 7).

Clauses of a grassroots social contract are of three legal types (Section 8), by whether a party can breach a clause and what record of it the contract leaves in another party's state: a clause is enforced, if performing it is an act of the contract and no act of the contract can breach it; attested, if a party may breach it, with the contract recording the breach; or undertaken, if the contract records who gave the undertaking, but performing the undertaking is carried out outside the contract. A breach of an enforced clause is impossible with a correct implementation of the contract; a breach of an attested or undertaken clause can be taken to court, with non-repudiably signed evidence of the breach in the case of an attested clause. We illustrate the three legal types with two grassroots social contracts, the grassroots social graph carrying signed items [11,7,8] and grassroots currencies [9]. The compilation and the conditions are algorithmic, so the only informal step in the chain is the first: rendering a legal text as schemas.

We carry two contracts through, a social graph carrying signed items and a currency of personal coins, and certify both from their schemas. A coin can be handed on, so a holding may record a person its holder has never transacted with; provenance carries the certification through, and conservation of money is its special case.

Three languages. The paper employs three languages: natural language for the social contract; act schemas; and volition-guarded atomic transactions. Rendering the first as the second is by judgement; compiling the second into the third is algorithmic; and the conditions of the main theorem—that a syntactically grassroots social contract is grassroots—are verified in the second. Clause 1 of the social graph contract (Section 2.1) reads "Alice and Bob may jointly decide to become friends, if neither is the friend of the other". Its schema (Section 3.3) names the act's two roles, marks each with ? as having to will it, and at each role forbids the atom that role gains and adds it:

befriend(Alice?,Bob?):¬friend(Bob),+friend(Bob)¬friend(Alice),+friend(Alice).befriend(Alice?, Bob?): \neg friend(Bob), +friend(Bob) \neg friend(Alice), +friend(Alice).

Compiling it (Section 5.2) gives the volition-guarded transaction (d→d′,{Alice,Bob})(d \to d', \{Alice, Bob\}), for every dd with friend(Bob)∉dAlicefriend(Bob) \notin d_{Alice} and friend(Alice)∉dBobfriend(Alice) \notin d_{Bob}, where dAlice′=dAlice⊕{friend(Bob)}d'_{Alice} = d_{Alice} \oplus \{friend(Bob)\} and dBob′=dBob⊕{friend(Alice)}d'_{Bob} = d_{Bob} \oplus \{friend(Alice)\}. The rest of the paper is read off the middle line.

The abstraction cascade. The passage from a legal text to a running platform goes through the abstraction cascade [6] set out in Figure 1, from the legal text at the top to an app on each party's own phone at the bottom. This paper provides (1)→(3). The steps below have been carried out by the Human-Science-AI methodology, in which AI derives code from a paper written for peer review and the paper is repaired wherever the code exposes a gap: the grassroots social graph [11], the grassroots social network [7] and grassroots currencies [12] are each a volition-guarded Grassroots Logic Program generated from its volition-guarded transactions, and one Dart bridge renders the three as panels of a single app, deployed on a physical smartphone [6]. A child-safe social network [13] is specified the same way.

The Human-Science-AI methodology. The formal objects of the cascade are its abstractions and the implementations among them, each constructed, maintained, evolved and proved correct with AI, in tandem with the paper describing it. The methodology has two kinds of artefact: papers written for competitive peer review, and code. The papers serve as an evolving and cooperatively-constructed interface between us humans and AI, recording our shared understanding of the subject matter, and are the source of authority for coding. Papers are written by people and reviewed, revised and extended with the help of AI; the code, with few exceptions, is written entirely by AI; and both evolve in the process of harmonising them. AI codes down the abstraction cascade, from a paper destined for peer review to tested code, and every gap the code exposes is repaired in the paper before it is repaired in the code. It is at the antipode of “vibe coding”, where a person describes the intended behaviour informally and AI guesses the rest [14]. Spec-driven development makes the specification the primary artefact, maintained by people while the code is regenerated from it [15,16]; here that artefact is a scientific paper, and the feedback climbs all the way up to revise it. Nine components were carried to tested code in a single year, each in tandem with the paper describing it.

Relation to contract specification languages. Formalising legal text has a large literature — contracts as automata, as defeasible deontic rules, as domain-specific languages, and statute as code — and Section 9 reviews it. Two languages formalise legal contracts in a way close enough to ours to say plainly how they differ. Symboleo [17,18] specifies a contract as obligations and powers with statechart lifetimes, for verification and for monitoring; Stipula [19] is a domain-specific language whose contracts are state machines over parties, fields and linear assets, with an agreement operator and a formal semantics. Both bind their parties at contract formation and both keep one global contract state. Our question is not about one contract instance among fixed parties: it is about the family of systems a contract induces over every finite set of people, and about what happens when two groups that formed independently meet. The question cannot be posed in either language, and each requires a global resource that closure forbids. Section 9 takes this up, together with the literature on norms and on contract languages more broadly.

Structure. Section 2 gives the two contracts and Section 3 the syntax of act schemas, with the schemas of both. Section 4 recalls what is needed of [10] and Section 5 compiles the schemas into its transactions. Section 6 defines politeness and proves it sufficient for a protocol to be volitionally grassroots, and Section 7 gives the conditions on the schemas and certifies both contracts from them. Section 8 takes up the clauses and their modalities, and Section 9 places the work. Appendix A states the framework of [10] formally, citing its proofs.

References (59)