<!-- canonical: efficientnewlanguage.org/ai/examples/947-the-drink-had-no-half-life | ai_layer_version: 0.1.0 | updated: 2026-09-21 -->

# Example 947 — The drink had no half life

`the_drink_had_no_half_life.eml` - A driver knows from a painkiller that four times the dose wears off in only twice the time, applies the same rule to four drinks instead of one, and plans the drive home for two hours after the last glass. How the two substances leave the body is computed below.

## EML

```eml
# Self-authored for the EML case corpus (no external origin). A driver knows
# from a painkiller that four times the dose wears off in only twice the time,
# applies the same rule to four drinks instead of one, and plans the drive home
# for two hours after the last glass. How the two substances leave the body is
# computed below.
#
# The reasoning is careful. The painkiller rule is real and was checked against
# its half-life; four drinks is four times one drink; the driver waited the
# doubled time exactly; and the intent is exactly 'be clear before driving'.
#
# A drug with a half-life loses a fixed fraction per hour, so four times as
# much needs only two more halvings, while alcohol is cleared at a fixed amount
# per hour regardless of how much is present - so four drinks take four times
# as long as one, not twice as long, and the driver was two hours early.

100 => painkiller_dose_mg
400 => painkiller_quadruple_dose_mg
25 => painkiller_worn_off_below_mg
4 => painkiller_half_life_hours

1 => one_drink_units
4 => four_drinks_units
1 => alcohol_cleared_units_per_hour

int(painkiller_dose_mg / 2) => painkiller_after_one_half_life_mg
int(painkiller_after_one_half_life_mg / 2) => painkiller_after_two_half_lives_mg
int(painkiller_quadruple_dose_mg / 2) => quadruple_after_one_half_life_mg
int(quadruple_after_one_half_life_mg / 2) => quadruple_after_two_half_lives_mg
int(quadruple_after_two_half_lives_mg / 2) => quadruple_after_three_half_lives_mg
int(quadruple_after_three_half_lives_mg / 2) => quadruple_after_four_half_lives_mg
2 * painkiller_half_life_hours => painkiller_hours_to_wear_off
4 * painkiller_half_life_hours => quadruple_hours_to_wear_off
int(quadruple_hours_to_wear_off / painkiller_hours_to_wear_off) => painkiller_time_multiplier_for_four_times_the_dose

int(one_drink_units / alcohol_cleared_units_per_hour) => one_drink_hours_to_clear
int(four_drinks_units / alcohol_cleared_units_per_hour) => four_drinks_hours_to_clear
int(four_drinks_hours_to_clear / one_drink_hours_to_clear) => alcohol_time_multiplier_for_four_times_the_drink
one_drink_hours_to_clear * painkiller_time_multiplier_for_four_times_the_dose => hours_the_driver_waited
four_drinks_hours_to_clear - hours_the_driver_waited => hours_the_driver_was_early
four_drinks_units - hours_the_driver_waited * alcohol_cleared_units_per_hour => units_still_in_the_blood_at_departure

"painkiller                      : " + str(painkiller_dose_mg) + " mg, half-life " + str(painkiller_half_life_hours) + " hours, worn off below " + str(painkiller_worn_off_below_mg) + " mg" ^0
"painkiller, one dose            : " + str(painkiller_dose_mg) + " then " + str(painkiller_after_one_half_life_mg) + " then " + str(painkiller_after_two_half_lives_mg) + " mg, " + str(painkiller_hours_to_wear_off) + " hours" ^0
"painkiller, four doses          : " + str(painkiller_quadruple_dose_mg) + " then " + str(quadruple_after_one_half_life_mg) + " then " + str(quadruple_after_two_half_lives_mg) + " then " + str(quadruple_after_three_half_lives_mg) + " then " + str(quadruple_after_four_half_lives_mg) + " mg, " + str(quadruple_hours_to_wear_off) + " hours" ^0
"painkiller rule                 : four times the dose, " + str(painkiller_time_multiplier_for_four_times_the_dose) + " times the wait" ^0
"" ^0
"alcohol                         : cleared at " + str(alcohol_cleared_units_per_hour) + " unit an hour, however much is present" ^0
"one drink                       : " + str(one_drink_units) + " unit, " + str(one_drink_hours_to_clear) + " hour" ^0
"four drinks                     : " + str(four_drinks_units) + " units, " + str(four_drinks_hours_to_clear) + " hours" ^0
"alcohol rule                    : four times the drink, " + str(alcohol_time_multiplier_for_four_times_the_drink) + " times the wait" ^0
"" ^0
"the driver waited               : " + str(hours_the_driver_waited) + " hours" ^0
"still in the blood at departure : " + str(units_still_in_the_blood_at_departure) + " units" ^0
"early by                        : " + str(hours_the_driver_was_early) + " hours" ^0
"" ^0

# ---- what the driver verified ----

"the borrowed rule" ^0
"  source : the painkiller's real half-life, checked" ^0
"  arithmetic : four times the amount, twice the time" ^0
"  count : four drinks is four times one drink" ^0
"  wait : the doubled time, to the minute" ^0
"  intent : be clear before driving" ^0
"  facts wrong : 0" ^0
"  verdict : FOUR DRINKS, TWO HOURS" ^0
"" ^0
"  checking the rule against the painkiller's half-life is the" ^0
"  part done right here, and it is why the rule is exactly" ^0
"  true of the painkiller" ^0
"" ^0

# ---- how the two substances leave ----

"two kinds of clearance" ^0
"  half-life : a fixed fraction leaves each hour, so a bigger" ^0
"    load shrinks faster in absolute terms; four times the dose" ^0
"    is only two more halvings, " + str(painkiller_hours_to_wear_off) + " to " + str(quadruple_hours_to_wear_off) + " hours" ^0
"  fixed rate : a fixed amount leaves each hour, so a bigger" ^0
"    load takes proportionally longer; four drinks is four" ^0
"    hours, not two" ^0
"  which one alcohol is : the fixed rate; the enzyme that clears" ^0
"    it is saturated at a single drink and works no faster" ^0
"    with more" ^0
"  what a half-life is : a property some substances have, not" ^0
"    a law about leaving the body" ^0
"" ^0

# ---- what the driver got ----

"the departure" ^0
"  believed : clear after " + str(hours_the_driver_waited) + " hours" ^0
"  actual : " + str(units_still_in_the_blood_at_departure) + " units still present, clear at " + str(four_drinks_hours_to_clear) + " hours" ^0
"  is the painkiller rule wrong : no; it is right for the painkiller" ^0
"  does alcohol have a half-life : not at these amounts; it has" ^0
"    a rate, and a rate is multiplied by the amount" ^0
"" ^0

# ---- null control ----

# The same four drinks timed by alcohol's own clearance instead of by the
# painkiller's rule.
2 => nc_hours_by_the_borrowed_half_life_rule
4 => nc_hours_by_the_fixed_clearance_rate
2 => nc_hours_the_right_rule_adds

"null control - time the drink by the drink's own clearance" ^0
"  hours, by the borrowed half-life rule : " + str(nc_hours_by_the_borrowed_half_life_rule) ^0
"  hours, by the fixed clearance rate : " + str(nc_hours_by_the_fixed_clearance_rate) ^0
"  hours the right rule adds : " + str(nc_hours_the_right_rule_adds) ^0
"  no drink and no wait was measured differently; the rule was" ^0
"  taken from the substance it describes" ^0
"" ^0

# ---- the rule ----

"what a verified half-life rule guarantees" ^0
"  four times this drug wears off in twice the time : exactly," ^0
"    for the drug whose half-life was checked" ^0
"  four drinks wear off in twice the time : not addressed;" ^0
"    alcohol leaves at a fixed " + str(alcohol_cleared_units_per_hour) + " unit an hour, so four units" ^0
"    take " + str(four_drinks_hours_to_clear) + " hours, and the driver left " + str(hours_the_driver_was_early) + " hours early" ^0
"" ^0

"a half-life is a fact about one substance, not a habit of the body; borrow" ^0
"the rule without the substance and the arithmetic stays perfect while the" ^0
"thing it was about walks out of the room" ^0
"" ^0

"The painkiller rule is true: " + str(painkiller_quadruple_dose_mg) + " mg wears off in " + str(quadruple_hours_to_wear_off) + " hours, twice the " + str(painkiller_hours_to_wear_off) + " of a" ^0
"single dose. But alcohol has no half-life at these amounts - it leaves at" ^0
"" + str(alcohol_cleared_units_per_hour) + " unit an hour - so four drinks take " + str(four_drinks_hours_to_clear) + " hours, and the driver who waited " + str(hours_the_driver_waited) ^0
"left with " + str(units_still_in_the_blood_at_departure) + " units still in the blood, until the rule is taken from the drink." ^0
```

## Python (deterministic transpilation)

```python
painkiller_dose_mg = 100
painkiller_quadruple_dose_mg = 400
painkiller_worn_off_below_mg = 25
painkiller_half_life_hours = 4
one_drink_units = 1
four_drinks_units = 4
alcohol_cleared_units_per_hour = 1
painkiller_after_one_half_life_mg = int(painkiller_dose_mg / 2)
painkiller_after_two_half_lives_mg = int(painkiller_after_one_half_life_mg / 2)
quadruple_after_one_half_life_mg = int(painkiller_quadruple_dose_mg / 2)
quadruple_after_two_half_lives_mg = int(quadruple_after_one_half_life_mg / 2)
quadruple_after_three_half_lives_mg = int(quadruple_after_two_half_lives_mg / 2)
quadruple_after_four_half_lives_mg = int(quadruple_after_three_half_lives_mg / 2)
painkiller_hours_to_wear_off = 2 * painkiller_half_life_hours
quadruple_hours_to_wear_off = 4 * painkiller_half_life_hours
painkiller_time_multiplier_for_four_times_the_dose = int(quadruple_hours_to_wear_off / painkiller_hours_to_wear_off)
one_drink_hours_to_clear = int(one_drink_units / alcohol_cleared_units_per_hour)
four_drinks_hours_to_clear = int(four_drinks_units / alcohol_cleared_units_per_hour)
alcohol_time_multiplier_for_four_times_the_drink = int(four_drinks_hours_to_clear / one_drink_hours_to_clear)
hours_the_driver_waited = one_drink_hours_to_clear * painkiller_time_multiplier_for_four_times_the_dose
hours_the_driver_was_early = four_drinks_hours_to_clear - hours_the_driver_waited
units_still_in_the_blood_at_departure = four_drinks_units - hours_the_driver_waited * alcohol_cleared_units_per_hour
print("painkiller                      : " + str(painkiller_dose_mg) + " mg, half-life " + str(painkiller_half_life_hours) + " hours, worn off below " + str(painkiller_worn_off_below_mg) + " mg")
print("painkiller, one dose            : " + str(painkiller_dose_mg) + " then " + str(painkiller_after_one_half_life_mg) + " then " + str(painkiller_after_two_half_lives_mg) + " mg, " + str(painkiller_hours_to_wear_off) + " hours")
print("painkiller, four doses          : " + str(painkiller_quadruple_dose_mg) + " then " + str(quadruple_after_one_half_life_mg) + " then " + str(quadruple_after_two_half_lives_mg) + " then " + str(quadruple_after_three_half_lives_mg) + " then " + str(quadruple_after_four_half_lives_mg) + " mg, " + str(quadruple_hours_to_wear_off) + " hours")
print("painkiller rule                 : four times the dose, " + str(painkiller_time_multiplier_for_four_times_the_dose) + " times the wait")
print("")
print("alcohol                         : cleared at " + str(alcohol_cleared_units_per_hour) + " unit an hour, however much is present")
print("one drink                       : " + str(one_drink_units) + " unit, " + str(one_drink_hours_to_clear) + " hour")
print("four drinks                     : " + str(four_drinks_units) + " units, " + str(four_drinks_hours_to_clear) + " hours")
print("alcohol rule                    : four times the drink, " + str(alcohol_time_multiplier_for_four_times_the_drink) + " times the wait")
print("")
print("the driver waited               : " + str(hours_the_driver_waited) + " hours")
print("still in the blood at departure : " + str(units_still_in_the_blood_at_departure) + " units")
print("early by                        : " + str(hours_the_driver_was_early) + " hours")
print("")
print("the borrowed rule")
print("  source : the painkiller's real half-life, checked")
print("  arithmetic : four times the amount, twice the time")
print("  count : four drinks is four times one drink")
print("  wait : the doubled time, to the minute")
print("  intent : be clear before driving")
print("  facts wrong : 0")
print("  verdict : FOUR DRINKS, TWO HOURS")
print("")
print("  checking the rule against the painkiller's half-life is the")
print("  part done right here, and it is why the rule is exactly")
print("  true of the painkiller")
print("")
print("two kinds of clearance")
print("  half-life : a fixed fraction leaves each hour, so a bigger")
print("    load shrinks faster in absolute terms; four times the dose")
print("    is only two more halvings, " + str(painkiller_hours_to_wear_off) + " to " + str(quadruple_hours_to_wear_off) + " hours")
print("  fixed rate : a fixed amount leaves each hour, so a bigger")
print("    load takes proportionally longer; four drinks is four")
print("    hours, not two")
print("  which one alcohol is : the fixed rate; the enzyme that clears")
print("    it is saturated at a single drink and works no faster")
print("    with more")
print("  what a half-life is : a property some substances have, not")
print("    a law about leaving the body")
print("")
print("the departure")
print("  believed : clear after " + str(hours_the_driver_waited) + " hours")
print("  actual : " + str(units_still_in_the_blood_at_departure) + " units still present, clear at " + str(four_drinks_hours_to_clear) + " hours")
print("  is the painkiller rule wrong : no; it is right for the painkiller")
print("  does alcohol have a half-life : not at these amounts; it has")
print("    a rate, and a rate is multiplied by the amount")
print("")
nc_hours_by_the_borrowed_half_life_rule = 2
nc_hours_by_the_fixed_clearance_rate = 4
nc_hours_the_right_rule_adds = 2
print("null control - time the drink by the drink's own clearance")
print("  hours, by the borrowed half-life rule : " + str(nc_hours_by_the_borrowed_half_life_rule))
print("  hours, by the fixed clearance rate : " + str(nc_hours_by_the_fixed_clearance_rate))
print("  hours the right rule adds : " + str(nc_hours_the_right_rule_adds))
print("  no drink and no wait was measured differently; the rule was")
print("  taken from the substance it describes")
print("")
print("what a verified half-life rule guarantees")
print("  four times this drug wears off in twice the time : exactly,")
print("    for the drug whose half-life was checked")
print("  four drinks wear off in twice the time : not addressed;")
print("    alcohol leaves at a fixed " + str(alcohol_cleared_units_per_hour) + " unit an hour, so four units")
print("    take " + str(four_drinks_hours_to_clear) + " hours, and the driver left " + str(hours_the_driver_was_early) + " hours early")
print("")
print("a half-life is a fact about one substance, not a habit of the body; borrow")
print("the rule without the substance and the arithmetic stays perfect while the")
print("thing it was about walks out of the room")
print("")
print("The painkiller rule is true: " + str(painkiller_quadruple_dose_mg) + " mg wears off in " + str(quadruple_hours_to_wear_off) + " hours, twice the " + str(painkiller_hours_to_wear_off) + " of a")
print("single dose. But alcohol has no half-life at these amounts - it leaves at")
print("" + str(alcohol_cleared_units_per_hour) + " unit an hour - so four drinks take " + str(four_drinks_hours_to_clear) + " hours, and the driver who waited " + str(hours_the_driver_waited))
print("left with " + str(units_still_in_the_blood_at_departure) + " units still in the blood, until the rule is taken from the drink.")
```

## stdout (executed)

```text
painkiller                      : 100 mg, half-life 4 hours, worn off below 25 mg
painkiller, one dose            : 100 then 50 then 25 mg, 8 hours
painkiller, four doses          : 400 then 200 then 100 then 50 then 25 mg, 16 hours
painkiller rule                 : four times the dose, 2 times the wait

alcohol                         : cleared at 1 unit an hour, however much is present
one drink                       : 1 unit, 1 hour
four drinks                     : 4 units, 4 hours
alcohol rule                    : four times the drink, 4 times the wait

the driver waited               : 2 hours
still in the blood at departure : 2 units
early by                        : 2 hours

the borrowed rule
  source : the painkiller's real half-life, checked
  arithmetic : four times the amount, twice the time
  count : four drinks is four times one drink
  wait : the doubled time, to the minute
  intent : be clear before driving
  facts wrong : 0
  verdict : FOUR DRINKS, TWO HOURS

  checking the rule against the painkiller's half-life is the
  part done right here, and it is why the rule is exactly
  true of the painkiller

two kinds of clearance
  half-life : a fixed fraction leaves each hour, so a bigger
    load shrinks faster in absolute terms; four times the dose
    is only two more halvings, 8 to 16 hours
  fixed rate : a fixed amount leaves each hour, so a bigger
    load takes proportionally longer; four drinks is four
    hours, not two
  which one alcohol is : the fixed rate; the enzyme that clears
    it is saturated at a single drink and works no faster
    with more
  what a half-life is : a property some substances have, not
    a law about leaving the body

the departure
  believed : clear after 2 hours
  actual : 2 units still present, clear at 4 hours
  is the painkiller rule wrong : no; it is right for the painkiller
  does alcohol have a half-life : not at these amounts; it has
    a rate, and a rate is multiplied by the amount

null control - time the drink by the drink's own clearance
  hours, by the borrowed half-life rule : 2
  hours, by the fixed clearance rate : 4
  hours the right rule adds : 2
  no drink and no wait was measured differently; the rule was
  taken from the substance it describes

what a verified half-life rule guarantees
  four times this drug wears off in twice the time : exactly,
    for the drug whose half-life was checked
  four drinks wear off in twice the time : not addressed;
    alcohol leaves at a fixed 1 unit an hour, so four units
    take 4 hours, and the driver left 2 hours early

a half-life is a fact about one substance, not a habit of the body; borrow
the rule without the substance and the arithmetic stays perfect while the
thing it was about walks out of the room

The painkiller rule is true: 400 mg wears off in 16 hours, twice the 8 of a
single dose. But alcohol has no half-life at these amounts - it leaves at
1 unit an hour - so four drinks take 4 hours, and the driver who waited 2
left with 2 units still in the blood, until the rule is taken from the drink.
```

## Round-trip

`ok: true` — round-trip fixpoint reached (python1 == python2)

## Trace event types

eml:run:start · eml:assign · eml:output · eml:run:done
