<!-- canonical: efficientnewlanguage.org/ai/examples/990-half-a-litre-and-half-a-litre-made-less-than-a-litre | ai_layer_version: 0.1.0 | updated: 2026-09-24 -->

# Example 990 — Half a litre and half a litre made less than a litre

`half_a_litre_and_half_a_litre_made_less_than_a_litre.eml` - A technician pours half a litre of ethanol and half a litre of water into a one-litre flask and expects the mixture to reach the mark exactly, reasoning that nothing escapes, nothing reacts, and 500 plus 500 is 1000. Where the mixture really comes to is computed below.

## EML

```eml
# Self-authored for the EML case corpus (no external origin). A technician pours
# half a litre of ethanol and half a litre of water into a one-litre flask and
# expects the mixture to reach the mark exactly, reasoning that nothing escapes,
# nothing reacts, and 500 plus 500 is 1000. Where the mixture really comes to is
# computed below.
#
# The reasoning is careful. Both volumes were measured exactly at the same
# temperature; nothing evaporates and nothing reacts; mass really is conserved;
# and the intent is exactly 'fill the flask to the mark'.
#
# Mass adds when liquids mix, but volume need not: water and ethanol molecules
# pack more closely together than either does alone, bound by hydrogen bonds.
# The 394 g of ethanol and 499 g of water make 893 g of a mixture that is denser
# than the average of the two - 926 g a litre - so it fills only 964 mL, 36 short
# of the mark.

500 => ethanol_ml
500 => water_ml
789 => ethanol_g_per_litre
998 => water_g_per_litre
926 => mixture_g_per_litre

int(ethanol_ml * ethanol_g_per_litre / 1000) => ethanol_g
int(water_ml * water_g_per_litre / 1000) => water_g
ethanol_g + water_g => mixture_g
ethanol_ml + water_ml => volumes_added_ml
int(mixture_g * 1000 / mixture_g_per_litre) => mixture_ml
volumes_added_ml - mixture_ml => short_of_the_mark_ml
int(mixture_g * 1000 / volumes_added_ml) => density_if_volumes_added_g_per_litre
int(ethanol_g * 1000 / mixture_g) => ethanol_share_by_mass_per_mille

"ethanol                         : " + str(ethanol_ml) + " mL at " + str(ethanol_g_per_litre) + " g a litre, " + str(ethanol_g) + " g" ^0
"water                           : " + str(water_ml) + " mL at " + str(water_g_per_litre) + " g a litre, " + str(water_g) + " g" ^0
"mixture's mass                  : " + str(mixture_g) + " g, " + str(ethanol_share_by_mass_per_mille) + " per mille ethanol by mass" ^0
"" ^0
"density if volumes added        : " + str(density_if_volumes_added_g_per_litre) + " g a litre" ^0
"density measured                : " + str(mixture_g_per_litre) + " g a litre" ^0
"volume, adding the volumes      : " + str(volumes_added_ml) + " mL" ^0
"volume, from the mass and density : " + str(mixture_ml) + " mL" ^0
"short of the mark by            : " + str(short_of_the_mark_ml) + " mL" ^0
"" ^0

# ---- what the technician verified ----

"the adding-up reasoning" ^0
"  volumes : " + str(ethanol_ml) + " and " + str(water_ml) + " mL, measured exactly" ^0
"  losses : nothing escapes, nothing reacts" ^0
"  mass : conserved" ^0
"  intent : fill the flask to the mark" ^0
"  facts wrong : 0" ^0
"  verdict : " + str(ethanol_ml) + " PLUS " + str(water_ml) + " FILLS THE " + str(volumes_added_ml) + " ML MARK" ^0
"" ^0
"  measuring both volumes exactly is the part done right here," ^0
"  and it is why the mass in the flask is exactly " + str(mixture_g) + " g" ^0
"" ^0

# ---- what mixing does to volume ----

"mass adds, volume need not" ^0
"  what is conserved : the mass, " + str(mixture_g) + " g, to the gram" ^0
"  what is not : the room the molecules take up" ^0
"  why : water and ethanol molecules bind to each other and pack" ^0
"    more closely than each does alone" ^0
"  the measured density : " + str(mixture_g_per_litre) + " g a litre, where adding the volumes" ^0
"    would make it " + str(density_if_volumes_added_g_per_litre) ^0
"  the volume : " + str(mixture_g) + " g at " + str(mixture_g_per_litre) + " g a litre, " + str(mixture_ml) + " mL" ^0
"" ^0

# ---- what the technician got ----

"the flask" ^0
"  believed : filled to the " + str(volumes_added_ml) + " mL mark" ^0
"  actual : " + str(mixture_ml) + " mL, " + str(short_of_the_mark_ml) + " short" ^0
"  was anything spilled : no; every gram is there" ^0
"  do volumes add when liquids mix : not in general; they add only" ^0
"    when the molecules ignore each other" ^0
"" ^0

# ---- null control ----

# The same mixture measured through its mass and density instead of by adding
# the two volumes.
1000 => nc_volume_read_as_the_sum_ml
964 => nc_volume_from_the_mass_and_density_ml
36 => nc_ml_the_packing_takes

"null control - take the volume from mass and density" ^0
"  volume, read as the sum : " + str(nc_volume_read_as_the_sum_ml) + " mL" ^0
"  volume, from the mass and the density : " + str(nc_volume_from_the_mass_and_density_ml) + " mL" ^0
"  mL the packing takes : " + str(nc_ml_the_packing_takes) ^0
"  no liquid and no flask changed; the quantity that is conserved" ^0
"  was carried through, and the volume was computed from it" ^0
"" ^0

# ---- the rule ----

"what two exactly measured volumes guarantee" ^0
"  the mass in the flask is their masses added : exactly" ^0
"  the volume in the flask is their volumes added : not addressed;" ^0
"    the molecules pack closer when mixed, the mixture weighs " + str(mixture_g_per_litre) + " g a" ^0
"    litre, and the " + str(mixture_g) + " g fill " + str(mixture_ml) + " mL, " + str(short_of_the_mark_ml) + " short of the mark" ^0
"" ^0

"conservation is a promise about what is kept, and volume was never on the" ^0
"list; mix two things that like each other and they take up less room together" ^0
"than apart" ^0
"" ^0

"Every gram is in the flask - " + str(mixture_g) + " g, conserved. But volume is not conserved: water" ^0
"and ethanol pack closer together than apart, the mixture weighs " + str(mixture_g_per_litre) + " g a" ^0
"litre, and the half-litres make " + str(mixture_ml) + " mL, " + str(short_of_the_mark_ml) + " short of the mark, until the volume" ^0
"is computed from the mass and the density rather than added." ^0
```

## Python (deterministic transpilation)

```python
ethanol_ml = 500
water_ml = 500
ethanol_g_per_litre = 789
water_g_per_litre = 998
mixture_g_per_litre = 926
ethanol_g = int(ethanol_ml * ethanol_g_per_litre / 1000)
water_g = int(water_ml * water_g_per_litre / 1000)
mixture_g = ethanol_g + water_g
volumes_added_ml = ethanol_ml + water_ml
mixture_ml = int(mixture_g * 1000 / mixture_g_per_litre)
short_of_the_mark_ml = volumes_added_ml - mixture_ml
density_if_volumes_added_g_per_litre = int(mixture_g * 1000 / volumes_added_ml)
ethanol_share_by_mass_per_mille = int(ethanol_g * 1000 / mixture_g)
print("ethanol                         : " + str(ethanol_ml) + " mL at " + str(ethanol_g_per_litre) + " g a litre, " + str(ethanol_g) + " g")
print("water                           : " + str(water_ml) + " mL at " + str(water_g_per_litre) + " g a litre, " + str(water_g) + " g")
print("mixture's mass                  : " + str(mixture_g) + " g, " + str(ethanol_share_by_mass_per_mille) + " per mille ethanol by mass")
print("")
print("density if volumes added        : " + str(density_if_volumes_added_g_per_litre) + " g a litre")
print("density measured                : " + str(mixture_g_per_litre) + " g a litre")
print("volume, adding the volumes      : " + str(volumes_added_ml) + " mL")
print("volume, from the mass and density : " + str(mixture_ml) + " mL")
print("short of the mark by            : " + str(short_of_the_mark_ml) + " mL")
print("")
print("the adding-up reasoning")
print("  volumes : " + str(ethanol_ml) + " and " + str(water_ml) + " mL, measured exactly")
print("  losses : nothing escapes, nothing reacts")
print("  mass : conserved")
print("  intent : fill the flask to the mark")
print("  facts wrong : 0")
print("  verdict : " + str(ethanol_ml) + " PLUS " + str(water_ml) + " FILLS THE " + str(volumes_added_ml) + " ML MARK")
print("")
print("  measuring both volumes exactly is the part done right here,")
print("  and it is why the mass in the flask is exactly " + str(mixture_g) + " g")
print("")
print("mass adds, volume need not")
print("  what is conserved : the mass, " + str(mixture_g) + " g, to the gram")
print("  what is not : the room the molecules take up")
print("  why : water and ethanol molecules bind to each other and pack")
print("    more closely than each does alone")
print("  the measured density : " + str(mixture_g_per_litre) + " g a litre, where adding the volumes")
print("    would make it " + str(density_if_volumes_added_g_per_litre))
print("  the volume : " + str(mixture_g) + " g at " + str(mixture_g_per_litre) + " g a litre, " + str(mixture_ml) + " mL")
print("")
print("the flask")
print("  believed : filled to the " + str(volumes_added_ml) + " mL mark")
print("  actual : " + str(mixture_ml) + " mL, " + str(short_of_the_mark_ml) + " short")
print("  was anything spilled : no; every gram is there")
print("  do volumes add when liquids mix : not in general; they add only")
print("    when the molecules ignore each other")
print("")
nc_volume_read_as_the_sum_ml = 1000
nc_volume_from_the_mass_and_density_ml = 964
nc_ml_the_packing_takes = 36
print("null control - take the volume from mass and density")
print("  volume, read as the sum : " + str(nc_volume_read_as_the_sum_ml) + " mL")
print("  volume, from the mass and the density : " + str(nc_volume_from_the_mass_and_density_ml) + " mL")
print("  mL the packing takes : " + str(nc_ml_the_packing_takes))
print("  no liquid and no flask changed; the quantity that is conserved")
print("  was carried through, and the volume was computed from it")
print("")
print("what two exactly measured volumes guarantee")
print("  the mass in the flask is their masses added : exactly")
print("  the volume in the flask is their volumes added : not addressed;")
print("    the molecules pack closer when mixed, the mixture weighs " + str(mixture_g_per_litre) + " g a")
print("    litre, and the " + str(mixture_g) + " g fill " + str(mixture_ml) + " mL, " + str(short_of_the_mark_ml) + " short of the mark")
print("")
print("conservation is a promise about what is kept, and volume was never on the")
print("list; mix two things that like each other and they take up less room together")
print("than apart")
print("")
print("Every gram is in the flask - " + str(mixture_g) + " g, conserved. But volume is not conserved: water")
print("and ethanol pack closer together than apart, the mixture weighs " + str(mixture_g_per_litre) + " g a")
print("litre, and the half-litres make " + str(mixture_ml) + " mL, " + str(short_of_the_mark_ml) + " short of the mark, until the volume")
print("is computed from the mass and the density rather than added.")
```

## stdout (executed)

```text
ethanol                         : 500 mL at 789 g a litre, 394 g
water                           : 500 mL at 998 g a litre, 499 g
mixture's mass                  : 893 g, 441 per mille ethanol by mass

density if volumes added        : 893 g a litre
density measured                : 926 g a litre
volume, adding the volumes      : 1000 mL
volume, from the mass and density : 964 mL
short of the mark by            : 36 mL

the adding-up reasoning
  volumes : 500 and 500 mL, measured exactly
  losses : nothing escapes, nothing reacts
  mass : conserved
  intent : fill the flask to the mark
  facts wrong : 0
  verdict : 500 PLUS 500 FILLS THE 1000 ML MARK

  measuring both volumes exactly is the part done right here,
  and it is why the mass in the flask is exactly 893 g

mass adds, volume need not
  what is conserved : the mass, 893 g, to the gram
  what is not : the room the molecules take up
  why : water and ethanol molecules bind to each other and pack
    more closely than each does alone
  the measured density : 926 g a litre, where adding the volumes
    would make it 893
  the volume : 893 g at 926 g a litre, 964 mL

the flask
  believed : filled to the 1000 mL mark
  actual : 964 mL, 36 short
  was anything spilled : no; every gram is there
  do volumes add when liquids mix : not in general; they add only
    when the molecules ignore each other

null control - take the volume from mass and density
  volume, read as the sum : 1000 mL
  volume, from the mass and the density : 964 mL
  mL the packing takes : 36
  no liquid and no flask changed; the quantity that is conserved
  was carried through, and the volume was computed from it

what two exactly measured volumes guarantee
  the mass in the flask is their masses added : exactly
  the volume in the flask is their volumes added : not addressed;
    the molecules pack closer when mixed, the mixture weighs 926 g a
    litre, and the 893 g fill 964 mL, 36 short of the mark

conservation is a promise about what is kept, and volume was never on the
list; mix two things that like each other and they take up less room together
than apart

Every gram is in the flask - 893 g, conserved. But volume is not conserved: water
and ethanol pack closer together than apart, the mixture weighs 926 g a
litre, and the half-litres make 964 mL, 36 short of the mark, until the volume
is computed from the mass and the density rather than added.
```

## Round-trip

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

## Trace event types

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