docs← Back to article

Markdown for LLMs

nb-02 exercise — solution

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# nb-02 exercise — solution

Bob's file: `disability_badge(bob)` + `fraud_flag(bob)`, nothing else.

## 1. Status — and is he refused?

`NEITHER`. The badge supports eligibility through `BadgeEligibility`,
but the defeater `FraudBlocksBadge` removes that support without deriving
the negation (`defeat permit_eligible(a)` is not `then not
permit_eligible(a)` — compare `FraudBlocksBadge` (lines 47–51) with
`FinesRefusal` (lines 30–34) in
`packs/examples/language-demo/permits/package.law`). With support removed
and no denial derived, neither side has support.

Bob is **not refused**. A refusal is `FALSE_ONLY`, which needs a derived
negation winning — as in the suite test `defeater removes support without
negation` (`tests/permits.lawtest`, lines 48–56, `expect truth_status ==
NEITHER`). Recording "refused for fraud" would invent a conclusion the
engine never drew; the honest record is "eligibility undecided".

## 2. Single change to eligibility

Remove `fraud_flag(bob)` from the file (equivalently: the fraud record is
withdrawn or rebutted, so the defeater no longer fires). The badge's
support then stands unopposed through `BadgeEligibility`, and the status
becomes `TRUE_ONLY`.

Checked: a scratch scenario with only `disability_badge(bob)` on file
evaluates `permit_eligible(bob)` to `TRUE_ONLY` (temporary copy of the
permits package with an added probe scenario; `law test` on the copy:
all scenarios passed, including the badge-alone probe).