Skip to content

Jersey L4 sample analyses: Charities (Jersey) Law 2014, and the Covid-19 Gathering Control Orders#44

Open
mengwong wants to merge 5 commits into
defaultfrom
jersey-l4-2026-07
Open

Jersey L4 sample analyses: Charities (Jersey) Law 2014, and the Covid-19 Gathering Control Orders#44
mengwong wants to merge 5 commits into
defaultfrom
jersey-l4-2026-07

Conversation

@mengwong

@mengwong mengwong commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Two Jersey formalisations, both under mengwong/sample-analyses-2026-07/.

charities-jersey-2014/ — the Charities (Jersey) Law 2014

A complete isomorphic encoding of all 43 Articles and both Schedules of the Charities (Jersey) Law 2014 (L.41/2014), from the official consolidated version showing the law from 16 October 2025.

Twelve files, 12,762 lines, 754 assertions. Every file typechecks; every assertion passes.

Written in inert style: the verbatim statutory prose rides inline as bare strings (which evaluate to the identity of their context — TRUE under AND, FALSE under OR — so they cannot change a result), ... is AND-sugar and .. is OR-sugar, and layout is the bracketing. Only the operative atoms are lifted to booleans. Reading down the left margin of a file is reading the Law. Constitutive rules are AND/OR trees; regulative rules use the deontic layer (PARTY x MUST/MAY/SHANT ... WITHIN n) and are exercised with #TRACE.

README.md is a report written for a legislative drafter (Matt Waddington), with sidebars explaining the logic that cannot be hidden behind a low-code surface: identity elements, vacuous truth, material implication, and MUST/MAY omission semantics.

Drafting observations

About twenty interpretation calls are flagged inline with >>> markers. Four look worth an amendment or a policy decision:

  • Art 2(1)(ba), inserted by R&O.56/2025 (in force 16 Oct 2025), sits between (b) and (c) — but Art 2(3)(a) still defines "Jersey entity" by the range "(a) to (h)". On the narrow reading, a Jersey-established NPO body corporate is not a Jersey entity, and so could never call itself a "Jersey charity" (Art 23(3)(b)). We encode the purposive reading and flag the gap.
  • Art 11(4)/(5): "if not so satisfied" attaches to the satisfaction condition, not to the compliance gate — so an applicant who fails the gate triggers neither a duty to register nor a duty to refuse. Both readings encoded.
  • Art 33(5)'s "at both times" is ambiguous as to scope: one ground subsisting at both times, or some ground at each? Both encoded; they diverge on a real scenario.
  • Art 34(1) (wrong or unreasonable on merits/facts/law) narrows to Art 35(1) (unreasonable). An appeal wrong on the law but not unreasonable is competent before the tribunal and incompetent before the court.

Also: Art 18(4)(a) read with Art 2(10)(b) would, composed literally, make a governor a misfeasor for having been the victim of an outsider's fraud; an excepted foreign charity always breaches Art 21(1), because Art 22(3)(b) defines it as one that "is not a registered charity"; and Art 4(4) of the consolidation appears to be missing the word "as".

GCO/ — the Covid-19 (Gathering Control) (Jersey) Order 2020

Point-in-time encodings of R&O.166/2020 at three moments — as first enacted, as at 15 January 2021, and as last in force before repeal — on a parallel skeleton so the diffs between versions are visible, with -- DIFF: markers at the divergences. Plus the Covid-19 (Mental Health) (Jersey) Order 2020 as at 15 January 2021.

All four typecheck. GCO-first-version.l4 initially did not — it was mid-refactor between two designs — and is fixed in this branch: PubliclyAccessiblePremisesGathering was used but never declared; its fields had also been folded into Gathering (which caused the ambiguous-projection error); GatheringSituation was dead while the code referred to Article3Situation / Article7Situation; and Gathering carried eight fields the first enacted text has no concept of (private dwelling, open air, workplace, construction site, education, controlled gathering, Christmas period) — all dead, all belonging to the later amendments. Removed, so that the diff between the version files is the diff between the laws.

GCO-README.md is an after-action note on the encoding, also addressed to Matt Waddington, with a frank scorecard separating what any formal language plus an IDE already solves from what L4's legal surface actually adds — and from what stays open because it is not a tooling problem at all.

Note on the branch

smucclaw/sandbox:default and legalese/sandbox:main have diverged substantially (~1,436 / ~1,806 commits). This branch is cut from upstream/default and carries only the three new commits, so it applies cleanly and does not drag the divergence in with it.

🤖 Generated with Claude Code

mengwong and others added 5 commits July 14, 2026 18:35
…ders in L4

Point-in-time encodings of the Covid-19 (Gathering Control) (Jersey) Order 2020
(R&O.166/2020) at three moments -- as first enacted, as at 15 January 2021, and
as last in force before repeal -- built on a parallel skeleton so the diffs
between versions are visible, with -- DIFF: markers at the divergences. Plus the
Covid-19 (Mental Health) (Jersey) Order 2020 as at 15 January 2021.

GCO-as-at-20210115, GCO-as-repealed and MHO-as-at-20210115 typecheck.
GCO-first-version does NOT yet typecheck: PubliclyAccessiblePremisesGathering is
undefined and there is a duplicate definition around lines 135-145. Committed
as-is, work in progress.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… Law 2014

An isomorphic formalisation of all 43 Articles and both Schedules of the
Charities (Jersey) Law 2014 (L.41/2014), from the official consolidated version
showing the law from 16 October 2025.

Twelve files, 12,762 lines, 754 assertions. Every file typechecks; every
assertion passes.

Written in INERT style: the verbatim statutory prose rides inline as bare
strings (which evaluate to the identity of their context -- TRUE under AND,
FALSE under OR -- so they cannot change a result), `...` is AND-sugar and `..`
is OR-sugar, and layout is the bracketing. Only the operative atoms are lifted
to booleans. Reading down the left margin of a file is reading the Law.
Constitutive rules are AND/OR trees; regulative rules use the deontic layer
(PARTY x MUST/MAY/SHANT ... WITHIN n) and are exercised with #TRACE.

README.md is a report written for a legislative drafter, with sidebars
explaining the logic that cannot be hidden behind a low-code surface (identity
elements, vacuous truth, material implication, MUST/MAY omission semantics).

Roughly twenty interpretation calls are flagged inline with >>> markers. Four
seem worth an amendment or a policy decision:

  * Art 2(1)(ba), inserted by R&O.56/2025 (in force 16 Oct 2025), sits between
    (b) and (c) -- but Art 2(3)(a) still defines "Jersey entity" by the range
    "(a) to (h)". On the narrow reading a Jersey-established NPO body corporate
    is not a Jersey entity, and so could never call itself a "Jersey charity"
    (Art 23(3)(b)). We encode the purposive reading and flag the gap.
  * Art 11(4)/(5): "if not so satisfied" attaches to the satisfaction condition,
    not to the compliance gate -- so an applicant who fails the gate triggers
    neither a duty to register nor a duty to refuse. Both readings encoded.
  * Art 33(5)'s "at both times" is ambiguous as to scope: one ground subsisting
    at both times, or some ground at each? Both encoded; they diverge.
  * Art 34(1) (wrong OR unreasonable on merits/facts/law) narrows to Art 35(1)
    (unreasonable). An appeal wrong on the law but not unreasonable is competent
    before the tribunal and incompetent before the court.

Also: Art 18(4)(a) read with Art 2(10)(b) would, composed literally, make a
governor a misfeasor for having been the victim of an outsider's fraud (we add
the attribution conjunct the reader silently supplies); an excepted foreign
charity always breaches Art 21(1), because Art 22(3)(b) defines it as one that
"is not a registered charity"; and Art 4(4) of the consolidation appears to be
missing the word "as" ("so far appears to him or her").

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The L4 excerpts in README.md wrapped when typeset to A4, which destroyed the
indentation -- and the indentation is precisely what those excerpts exist to
demonstrate. Elide the longest inert strings so every code line fits the page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The file was mid-refactor between two designs and did not compile. Its DECLARE
block had drifted from the parallel skeleton the header promises, while the rest
of the file already used the sibling design.

  * PubliclyAccessiblePremisesGathering was USED (Art.7, and the `pub indoor of
    10/12` literals) but never DECLAREd. Added, with the same four fields as
    GCO-as-repealed.l4 and GCO-as-at-20210115.l4. Art.7 has its own subject --
    the premises -- and its own headcount ("persons gathering in the indoor
    areas"), which is a different number of a different thing from Art.3's
    "persons taking part". Keeping them separate records keeps that distinction.

  * The Art.7 fields had also been folded into Gathering, which is what produced
    the "multiple definitions" error on the projection. Removed from Gathering.

  * GatheringSituation was declared but never used; the code refers to
    Article3Situation and Article7Situation (as the siblings do). Replaced.

  * Gathering carried eight fields that the FIRST ENACTED text has no concept of
    -- private dwelling, open air, workplace, construction site, excepted
    workplace, education institution, controlled gathering, Christmas period.
    All eight were dead (declared, never read): as first enacted, Art.3 was a
    flat 10-person cap at "any premises". They belong to the later amendments and
    are present in the two later files. Removed, with a note saying so, which is
    the point of a parallel skeleton: the diff between versions should be the
    diff between the laws.

All four GCO files now typecheck. GCO-first-version runs 14 assertions, 0 failures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ports

GCO-README.md: an after-action note on encoding the Covid-19 (Gathering Control)
(Jersey) Order 2020, addressed to Matthew Waddington -- the encoding process
step by step, findings, and a frank scorecard separating what any formal language
plus an IDE already solves from what L4's legal surface actually adds, and from
what stays open because it is not a tooling problem at all.

Typeset both reports to A4 PDF (pandoc -> print stylesheet -> headless Chrome):
  charities-jersey-2014-report.pdf   21pp
  GCO-report.pdf                     10pp

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant