Markdown for LLMs
Link a subtype and a temporal role
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# Link a subtype and a temporal role
## Intent
I want to join subtype facts with supertype facts without turning a role into a permanent type.
Branch and company facts join.
## Wrong form and why it stays silent
```law title="Incorrect form"
entity Branch; // связь с Company потеряна
```
An explicit subtype is compatible with a Company slot. Role Applicant declares the role name; it itself assigns no participant. In the working example the temporal role is presented by relation applicant.
## Correct form
```law
language "law.core" version "0.2";
package recipes.g.r08 version "0.1.0";
namespace "urn:recipe:g-concepts:08";
entity Company;
entity Branch : Company;
role Applicant for Company;
relation branch(b: Branch);
relation registered(c: Company);
relation applicant(c: Company);
relation eligible(b: Branch);
rule Qualify strict { for b: Branch; when branch(b) and registered(b) and applicant(b); then eligible(b); }
```
## Frozen execution scene
| Facts on 13.09.2026 | Question | Answer |
|---|---|---|
| one branch, three facts | `truth(eligible(entity_ref("urn:recipe:g-concepts:08:p")))` | `truth_status == TRUE_ONLY;` / `COMPUTED` |
| role not given | `truth(eligible(entity_ref("urn:recipe:g-concepts:08:p")))` | `truth_status == NEITHER;` / `COMPUTED` |
| different entities | `truth(eligible(entity_ref("urn:recipe:g-concepts:08:p")))` | `truth_status == NEITHER;` / `COMPUTED` |
```law
test "one branch with three facts qualifies" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
timezone "Asia/Almaty";
}
assert branch(entity_ref("urn:recipe:g-concepts:08:p")); assert registered(entity_ref("urn:recipe:g-concepts:08:p")); assert applicant(entity_ref("urn:recipe:g-concepts:08:p"));
}
evaluate truth(eligible(entity_ref("urn:recipe:g-concepts:08:p")));
expect truth_status == TRUE_ONLY;
expect evaluation_status == COMPUTED;
}
```
```law
test "missing role stays unknown" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
timezone "Asia/Almaty";
}
assert branch(entity_ref("urn:recipe:g-concepts:08:p")); assert registered(entity_ref("urn:recipe:g-concepts:08:p"));
}
evaluate truth(eligible(entity_ref("urn:recipe:g-concepts:08:p")));
expect truth_status == NEITHER;
expect evaluation_status == COMPUTED;
}
```
```law
test "different entities stay unlinked" {
given {
context {
legal_time @2026-09-13;
decision_time @2026-09-13T09:00:00+05:00;
knowledge_time @2026-09-13T09:00:00+05:00;
timezone "Asia/Almaty";
}
assert branch(entity_ref("urn:recipe:g-concepts:08:p")); assert registered(entity_ref("urn:recipe:g-concepts:08:q")); assert applicant(entity_ref("urn:recipe:g-concepts:08:p"));
}
evaluate truth(eligible(entity_ref("urn:recipe:g-concepts:08:p")));
expect truth_status == NEITHER;
expect evaluation_status == COMPUTED;
}
```
## Counterfactual
Mutation `entity Branch : Company;` → `entity Branch;`: LDC-E2104.
## Boundary
A role declaration is sugar for a standard role, not a subtype and not membership. Full has_role with legal_context/during is needed when the role itself participates in a cross-context model.