Legal Entities and Relationships
Establishing your baseline
2.1 From Strings to Structured Types
Problem: Using simple text leads to errors and ambiguity.
Bad approach:
charity MEANS "Some Charity Name" -- Just text, no structureBetter approach - Structured Types:
DECLARE RegisteredCharity
HAS name IS A STRING
registrationNumber IS A STRING
registrationDate IS A Date
address IS A STRING
purposes IS A LIST OF PurposeWhy This Matters:
Prevents errors: Can't accidentally use a person where you need a charity
Captures relationships: Links charities to their purposes, addresses, etc.
Enables validation: L4 can check if all required information is present
Example:
DECIDE animalCharity
IS RegisteredCharity
"Jersey Animal Welfare"
"CH001"
(Date 2020 1 15)
"St. Helier, Jersey"
(LIST `advancement of animal welfare`)2.2 Enumerating Legal Categories
Legal Insight: Law often provides specific lists and categories.
Instead of treating charitable purposes as free text:
Use precise legal categories:
Benefits:
Matches legal structure: Mirrors how legislation actually defines categories
Prevents typos: Can't accidentally write "education advancement" instead of "advancement of education"
Enables legal tests: Can easily check if all purposes are charitable
Pattern matching with legal categories:
2.3 Connecting Multiple Entities
Legal systems involve relationships between multiple entities:
Real legal rule using relationships:
Success Check: You can now model structured legal entities, use proper legal categories, and express relationships between entities.
Last updated
