lemma 0.9.3

A pure, declarative language for business rules.
**Rules and unless: last matching clause wins**

Default expression, then `unless <condition> then <result>`. Source order; **bottommost match wins**. General first, specific last. Snake_case names; boolean predicates (`is_eligible`, `can_ship`). Named pipeline rules — no opaque mega-expressions.

**Domain-principle default**

Default is not "prefer yes/no." It is the answer **in principle for this rule's domain**. Experts must read top-to-bottom as: "In principle X; unless Y, then Z."

1. Name the question (`can_ship` → "Can we ship this order?").
2. Before special cases, what is true in principle? That is the default — from *this* rule's domain, not optimism or "start true and subtract failures."
3. What positive facts change the answer? Those are `unless` conditions — not `… is false then flip`.
4. Write `rule name: <principle> unless <positive conditions> then <exception>`.

Examples by domain: shipping often earned (`no` unless grant); discount often `0%`; fees use the policy's usual fee — not "free unless expensive."

Forbidden: double denial (`yes` / `unless … is false then no`); fail-each-check cascades; invented `*_compliant` default-yes helpers.

```lemma-skip
rule can_ship: no
  unless in_stock
    and address_complete
    then yes
```

**Example F — overlapping unless (last wins)**

```lemma
spec vip_discount

data qty: number
data is_vip:   boolean

rule discount: 0%
  unless qty >= 10  then 10%
  unless qty >= 50  then 20%
  unless is_vip          then 25%
```

VIP ordering 75 items gets **25%** (not 20%): both `qty >= 50` and `is_vip` match; bottommost wins.

**Example G — progressive unless chain**

```lemma
spec rules_and_unless

data is_premium: yes
data base_price: number -> minimum 0
data qty:        number -> minimum 0

rule total_before_discount: base_price * qty

rule discount_percentage: 0%
  unless qty >= 10 then 10%
  unless qty >= 20 then 15%
  unless is_premium then 20%

rule discount_amount:      total_before_discount * discount_percentage
rule total_after_discount: total_before_discount - discount_amount

rule shipping_cost: 15
  unless total_after_discount >= 100 then 10
  unless total_after_discount >= 200 then 0

rule final_total: total_after_discount + shipping_cost
```

**Example H — short pipeline sketch**

```lemma
spec shipping_fees
uses lemma units

data item_weight: units.mass
data order_total: number -> minimum 0

rule base_rate: 22
rule weight_surcharge: 0
  unless item_weight > 5 kilogram then 7.5

rule final_shipping: base_rate + weight_surcharge
  unless order_total >= 100 then 0
```