EU, Swiss, UK, Chinese, Indian, Singapore, UAE and US law as executable, tested, traceable logic¶
This repository holds EU, Swiss, UK, Chinese, Indian, Singapore, UAE and US legal provisions written as small logic programs that answer one legal question each: is this person a beneficial owner?, what is the minimum time limit for receipt of tenders?, does this aid stay under the de minimis ceiling? Each domain covers one narrowly scoped question, drawn from one or a few articles; none is a complete formalization of a statute. Every rule names the provision it implements, every quotation is checked against the official text, and every domain says what it deliberately does not cover. The rules are written in [Clausal Prolog](https://clausal.pl), a restricted subset of ISO Prolog meant to run on standard Prolog engines.
Disclaimer
These rules are drafted readings derived from the cited statutes. They were generated and tested by automated processes. They are not legal advice and have not been validated by a lawyer. Where a domain lists open questions or alternative readings, they are listed in that domain. The statute text prevails: the code is subsidiary to the statutes.
What this is, and what it is not¶
It is a working, checked starting point: a set of formalizations built to a stated method, with the evidence for each claim inside the repository, so that anyone can re-run the checks.
It is not a finished product and not legal advice. The interpretive choices are recorded so that lawyers can review them, the provisions not formalized are listed with the consequence of leaving them out, and the scope of each domain is narrow on purpose. See Lawyers in the loop and Status of each domain.
A rule, its provision, and its test¶
The minimum time limit in an open procedure, from Directive 2014/24/EU Article 27:
% Art 27(1) subpara 2: base minimum 35 days from contract-notice dispatch.
minimum_time_limit_days(open_procedure, receipt_of_tenders,
baseline_minimum, 35, cite(eu_dir_2014_24_art_27)) :-
implements(eu_dir_2014_24_art_27).
% Art 27(2): prior information notice published 35 days - 12 months before
% the contract notice -> minimum may be shortened to 15 days.
minimum_time_limit_days(open_procedure, receipt_of_tenders,
with_prior_information_notice, 15, cite(eu_dir_2014_24_art_27)) :-
implements(eu_dir_2014_24_art_27).
The citation eu_dir_2014_24_art_27 is a record holding the exact words of the Directive,
checked character for character against a pinned copy of the consolidated text from EUR-Lex:
citation(eu_dir_2014_24_art_27, [
label-'Directive 2014/24/EU, Article 27 (Open procedure)',
ref-'http://publications.europa.eu/resource/celex/02014L0024-20260101.ENG.fmx4',
verbatim-'The minimum time limit for the receipt of tenders shall be 35 days from the date on which the contract notice was sent.',
units-['02014L0024-20260101#parag_027.001',
'02014L0024-20260101#parag_027.002',
'02014L0024-20260101#point_027.002_a',
'02014L0024-20260101#point_027.002_b',
'02014L0024-20260101#parag_027.003',
'02014L0024-20260101#parag_027.004']
]).
Each answer the domain gives carries the citations that produced it, so a reader can go from any result back to the sentence of law it rests on.
Where to start¶
-
The questions we expect: liability, versions of the law, discretion, languages, the AI Act.
-
Ten kinds of check, from unit tests to hidden mutation testing.
-
Pinned sources, verified quotations, and a side-by-side report per domain.
-
Where human legal judgement sits, and how it is recorded.