Case 980
The head on at fifty each hit like fifty not a hundred
the_head_on_at_fifty_each_hit_like_fifty_not_a_hundred.eml - A road-safety talk describes two identical 1500 kg cars meeting head-on at 50 km/h each, adds the speeds to a closing speed of 100, and tells the audience that each driver takes the crash of hitting a wall at 100. What each car actually goes through, and when the closing speed does matter, is computed below.
ok: true — round-trip fixpoint reached (python1 == python2)updated 2026-09-23
EML
eml# Self-authored for the EML case corpus (no external origin). A road-safety talk
# describes two identical 1500 kg cars meeting head-on at 50 km/h each, adds the
# speeds to a closing speed of 100, and tells the audience that each driver
# takes the crash of hitting a wall at 100. What each car actually goes through,
# and when the closing speed does matter, is computed below.
#
# The reasoning is careful. Each car really is doing 50; the closing speed
# really is 100; both cars really do stop dead in the crash; and the intent is
# exactly 'how hard is this crash for each driver'.
#
# What a car's occupants go through is the car's own change of speed. Two equal
# cars with equal and opposite momentum both end at rest, so each changes speed
# by 50 - a wall at 50, a quarter of the energy of a wall at 100. The closing
# speed matters only through the masses: a 1500 kg car meeting a 15000 kg truck
# at the same 50 each changes speed by 90, while the truck changes by 9.
50 => each_car_kmh
1500 => car_kg
15000 => truck_kg
2 * each_car_kmh => closing_speed_kmh
car_kg * each_car_kmh => momentum_eastbound
car_kg * each_car_kmh => momentum_westbound
momentum_eastbound - momentum_westbound => momentum_left_after_the_crash
int(momentum_left_after_the_crash / (2 * car_kg)) => speed_after_the_crash_kmh
each_car_kmh - speed_after_the_crash_kmh => each_cars_change_of_speed_kmh
int(each_cars_change_of_speed_kmh * each_cars_change_of_speed_kmh * 1000 / (closing_speed_kmh * closing_speed_kmh)) => each_cars_energy_vs_a_wall_at_100_per_mille
int(2 * each_car_kmh * truck_kg / (car_kg + truck_kg)) => car_change_of_speed_against_the_truck_kmh
int(2 * each_car_kmh * car_kg / (car_kg + truck_kg)) => truck_change_of_speed_kmh
int(truck_kg / car_kg) => truck_outweighs_the_car_by
"each car : " + str(car_kg) + " kg at " + str(each_car_kmh) + " km/h" ^0
"closing speed : " + str(closing_speed_kmh) + " km/h" ^0
"momentum, one each way : " + str(momentum_eastbound) + " and " + str(momentum_westbound) + ", " + str(momentum_left_after_the_crash) + " left after the crash" ^0
"speed after the crash : " + str(speed_after_the_crash_kmh) + " km/h" ^0
"each car's change of speed : " + str(each_cars_change_of_speed_kmh) + " km/h, a wall at " + str(each_cars_change_of_speed_kmh) ^0
"each car's energy vs a wall at " + str(closing_speed_kmh) + " : " + str(each_cars_energy_vs_a_wall_at_100_per_mille) + " per mille" ^0
"" ^0
"a car against a truck : truck " + str(truck_kg) + " kg, " + str(truck_outweighs_the_car_by) + " times the car" ^0
" the car's change of speed : " + str(car_change_of_speed_against_the_truck_kmh) + " km/h" ^0
" the truck's change of speed : " + str(truck_change_of_speed_kmh) + " km/h" ^0
"" ^0
# ---- what the talk verified ----
"the add-the-speeds reasoning" ^0
" each car : " + str(each_car_kmh) + " km/h" ^0
" closing speed : " + str(closing_speed_kmh) + " km/h" ^0
" outcome : both cars stop dead" ^0
" intent : how hard is this crash for each driver" ^0
" facts wrong : 0" ^0
" verdict : EACH DRIVER HITS A WALL AT " + str(closing_speed_kmh) ^0
"" ^0
" adding the two speeds is the part done right here, and it is" ^0
" why the cars really do close on each other at " + str(closing_speed_kmh) + " km/h" ^0
"" ^0
# ---- what each car goes through ----
"the change of speed" ^0
" what the occupants feel : their own car's change of speed, over" ^0
" the time its front crumples" ^0
" two equal cars : equal and opposite momentum, " + str(momentum_left_after_the_crash) + " left, so both" ^0
" stop, and each changes speed by " + str(each_cars_change_of_speed_kmh) + " km/h" ^0
" a wall at " + str(closing_speed_kmh) + " : a change of " + str(closing_speed_kmh) + ", four times the energy; each" ^0
" car here takes " + str(each_cars_energy_vs_a_wall_at_100_per_mille) + " per mille of that" ^0
" when the closing speed bites : when the masses differ; the" ^0
" light car is flung backwards by the heavy one, a change of" ^0
" " + str(car_change_of_speed_against_the_truck_kmh) + " km/h against the truck's " + str(truck_change_of_speed_kmh) ^0
"" ^0
# ---- what the audience got ----
"the lesson" ^0
" believed : a head-on at " + str(each_car_kmh) + " each is a wall at " + str(closing_speed_kmh) ^0
" actual : for equal cars, a wall at " + str(each_cars_change_of_speed_kmh) + "; against a truck, nearly" ^0
" a wall at " + str(car_change_of_speed_against_the_truck_kmh) ^0
" is the closing speed wrong : no; it is " + str(closing_speed_kmh) ^0
" does the closing speed say what each car goes through : no;" ^0
" that depends on how the momentum is shared" ^0
"" ^0
# ---- null control ----
# The same crash read from each car's change of speed instead of from the
# closing speed.
100 => nc_change_of_speed_read_from_the_closing_speed_kmh
50 => nc_change_of_speed_read_from_the_momentum_kmh
50 => nc_kmh_the_momentum_reading_removes
"null control - read the crash from each car's change of speed" ^0
" change of speed, read from the closing speed : " + str(nc_change_of_speed_read_from_the_closing_speed_kmh) + " km/h" ^0
" change of speed, read from the momentum : " + str(nc_change_of_speed_read_from_the_momentum_kmh) + " km/h" ^0
" km/h the momentum reading removes : " + str(nc_kmh_the_momentum_reading_removes) ^0
" no car and no speed changed; each car was judged by what" ^0
" happened to it, not by the gap the two of them closed" ^0
"" ^0
# ---- the rule ----
"what a closing speed of " + str(closing_speed_kmh) + " guarantees" ^0
" the cars approach each other at " + str(closing_speed_kmh) + " : exactly" ^0
" each car crashes as if into a wall at " + str(closing_speed_kmh) + " : not addressed; with" ^0
" equal masses each car's speed changes by " + str(each_cars_change_of_speed_kmh) + ", a wall at " + str(each_cars_change_of_speed_kmh) + " and" ^0
" " + str(each_cars_energy_vs_a_wall_at_100_per_mille) + " per mille of the energy - and it is the mass ratio that" ^0
" decides, a change of " + str(car_change_of_speed_against_the_truck_kmh) + " for the car against a truck" ^0
"" ^0
"a closing speed describes the gap, not the people in it; what each of them" ^0
"goes through is their own change of speed, and that is shared out by mass" ^0
"" ^0
"The cars close at " + str(closing_speed_kmh) + " km/h - that is exact. But each car's occupants feel their" ^0
"own change of speed, and two equal cars both stop: a change of " + str(each_cars_change_of_speed_kmh) + ", a wall at" ^0
"" + str(each_cars_change_of_speed_kmh) + ", " + str(each_cars_energy_vs_a_wall_at_100_per_mille) + " per mille of the energy of one at " + str(closing_speed_kmh) + ", while the same car against a truck" ^0
"changes by " + str(car_change_of_speed_against_the_truck_kmh) + ", until the crash is read by what happens to each car." ^0Python (deterministic transpilation)
pythoneach_car_kmh = 50
car_kg = 1500
truck_kg = 15000
closing_speed_kmh = 2 * each_car_kmh
momentum_eastbound = car_kg * each_car_kmh
momentum_westbound = car_kg * each_car_kmh
momentum_left_after_the_crash = momentum_eastbound - momentum_westbound
speed_after_the_crash_kmh = int(momentum_left_after_the_crash / (2 * car_kg))
each_cars_change_of_speed_kmh = each_car_kmh - speed_after_the_crash_kmh
each_cars_energy_vs_a_wall_at_100_per_mille = int(each_cars_change_of_speed_kmh * each_cars_change_of_speed_kmh * 1000 / (closing_speed_kmh * closing_speed_kmh))
car_change_of_speed_against_the_truck_kmh = int(2 * each_car_kmh * truck_kg / (car_kg + truck_kg))
truck_change_of_speed_kmh = int(2 * each_car_kmh * car_kg / (car_kg + truck_kg))
truck_outweighs_the_car_by = int(truck_kg / car_kg)
print("each car : " + str(car_kg) + " kg at " + str(each_car_kmh) + " km/h")
print("closing speed : " + str(closing_speed_kmh) + " km/h")
print("momentum, one each way : " + str(momentum_eastbound) + " and " + str(momentum_westbound) + ", " + str(momentum_left_after_the_crash) + " left after the crash")
print("speed after the crash : " + str(speed_after_the_crash_kmh) + " km/h")
print("each car's change of speed : " + str(each_cars_change_of_speed_kmh) + " km/h, a wall at " + str(each_cars_change_of_speed_kmh))
print("each car's energy vs a wall at " + str(closing_speed_kmh) + " : " + str(each_cars_energy_vs_a_wall_at_100_per_mille) + " per mille")
print("")
print("a car against a truck : truck " + str(truck_kg) + " kg, " + str(truck_outweighs_the_car_by) + " times the car")
print(" the car's change of speed : " + str(car_change_of_speed_against_the_truck_kmh) + " km/h")
print(" the truck's change of speed : " + str(truck_change_of_speed_kmh) + " km/h")
print("")
print("the add-the-speeds reasoning")
print(" each car : " + str(each_car_kmh) + " km/h")
print(" closing speed : " + str(closing_speed_kmh) + " km/h")
print(" outcome : both cars stop dead")
print(" intent : how hard is this crash for each driver")
print(" facts wrong : 0")
print(" verdict : EACH DRIVER HITS A WALL AT " + str(closing_speed_kmh))
print("")
print(" adding the two speeds is the part done right here, and it is")
print(" why the cars really do close on each other at " + str(closing_speed_kmh) + " km/h")
print("")
print("the change of speed")
print(" what the occupants feel : their own car's change of speed, over")
print(" the time its front crumples")
print(" two equal cars : equal and opposite momentum, " + str(momentum_left_after_the_crash) + " left, so both")
print(" stop, and each changes speed by " + str(each_cars_change_of_speed_kmh) + " km/h")
print(" a wall at " + str(closing_speed_kmh) + " : a change of " + str(closing_speed_kmh) + ", four times the energy; each")
print(" car here takes " + str(each_cars_energy_vs_a_wall_at_100_per_mille) + " per mille of that")
print(" when the closing speed bites : when the masses differ; the")
print(" light car is flung backwards by the heavy one, a change of")
print(" " + str(car_change_of_speed_against_the_truck_kmh) + " km/h against the truck's " + str(truck_change_of_speed_kmh))
print("")
print("the lesson")
print(" believed : a head-on at " + str(each_car_kmh) + " each is a wall at " + str(closing_speed_kmh))
print(" actual : for equal cars, a wall at " + str(each_cars_change_of_speed_kmh) + "; against a truck, nearly")
print(" a wall at " + str(car_change_of_speed_against_the_truck_kmh))
print(" is the closing speed wrong : no; it is " + str(closing_speed_kmh))
print(" does the closing speed say what each car goes through : no;")
print(" that depends on how the momentum is shared")
print("")
nc_change_of_speed_read_from_the_closing_speed_kmh = 100
nc_change_of_speed_read_from_the_momentum_kmh = 50
nc_kmh_the_momentum_reading_removes = 50
print("null control - read the crash from each car's change of speed")
print(" change of speed, read from the closing speed : " + str(nc_change_of_speed_read_from_the_closing_speed_kmh) + " km/h")
print(" change of speed, read from the momentum : " + str(nc_change_of_speed_read_from_the_momentum_kmh) + " km/h")
print(" km/h the momentum reading removes : " + str(nc_kmh_the_momentum_reading_removes))
print(" no car and no speed changed; each car was judged by what")
print(" happened to it, not by the gap the two of them closed")
print("")
print("what a closing speed of " + str(closing_speed_kmh) + " guarantees")
print(" the cars approach each other at " + str(closing_speed_kmh) + " : exactly")
print(" each car crashes as if into a wall at " + str(closing_speed_kmh) + " : not addressed; with")
print(" equal masses each car's speed changes by " + str(each_cars_change_of_speed_kmh) + ", a wall at " + str(each_cars_change_of_speed_kmh) + " and")
print(" " + str(each_cars_energy_vs_a_wall_at_100_per_mille) + " per mille of the energy - and it is the mass ratio that")
print(" decides, a change of " + str(car_change_of_speed_against_the_truck_kmh) + " for the car against a truck")
print("")
print("a closing speed describes the gap, not the people in it; what each of them")
print("goes through is their own change of speed, and that is shared out by mass")
print("")
print("The cars close at " + str(closing_speed_kmh) + " km/h - that is exact. But each car's occupants feel their")
print("own change of speed, and two equal cars both stop: a change of " + str(each_cars_change_of_speed_kmh) + ", a wall at")
print("" + str(each_cars_change_of_speed_kmh) + ", " + str(each_cars_energy_vs_a_wall_at_100_per_mille) + " per mille of the energy of one at " + str(closing_speed_kmh) + ", while the same car against a truck")
print("changes by " + str(car_change_of_speed_against_the_truck_kmh) + ", until the crash is read by what happens to each car.")stdout (executed)
texteach car : 1500 kg at 50 km/h
closing speed : 100 km/h
momentum, one each way : 75000 and 75000, 0 left after the crash
speed after the crash : 0 km/h
each car's change of speed : 50 km/h, a wall at 50
each car's energy vs a wall at 100 : 250 per mille
a car against a truck : truck 15000 kg, 10 times the car
the car's change of speed : 90 km/h
the truck's change of speed : 9 km/h
the add-the-speeds reasoning
each car : 50 km/h
closing speed : 100 km/h
outcome : both cars stop dead
intent : how hard is this crash for each driver
facts wrong : 0
verdict : EACH DRIVER HITS A WALL AT 100
adding the two speeds is the part done right here, and it is
why the cars really do close on each other at 100 km/h
the change of speed
what the occupants feel : their own car's change of speed, over
the time its front crumples
two equal cars : equal and opposite momentum, 0 left, so both
stop, and each changes speed by 50 km/h
a wall at 100 : a change of 100, four times the energy; each
car here takes 250 per mille of that
when the closing speed bites : when the masses differ; the
light car is flung backwards by the heavy one, a change of
90 km/h against the truck's 9
the lesson
believed : a head-on at 50 each is a wall at 100
actual : for equal cars, a wall at 50; against a truck, nearly
a wall at 90
is the closing speed wrong : no; it is 100
does the closing speed say what each car goes through : no;
that depends on how the momentum is shared
null control - read the crash from each car's change of speed
change of speed, read from the closing speed : 100 km/h
change of speed, read from the momentum : 50 km/h
km/h the momentum reading removes : 50
no car and no speed changed; each car was judged by what
happened to it, not by the gap the two of them closed
what a closing speed of 100 guarantees
the cars approach each other at 100 : exactly
each car crashes as if into a wall at 100 : not addressed; with
equal masses each car's speed changes by 50, a wall at 50 and
250 per mille of the energy - and it is the mass ratio that
decides, a change of 90 for the car against a truck
a closing speed describes the gap, not the people in it; what each of them
goes through is their own change of speed, and that is shared out by mass
The cars close at 100 km/h - that is exact. But each car's occupants feel their
own change of speed, and two equal cars both stop: a change of 50, a wall at
50, 250 per mille of the energy of one at 100, while the same car against a truck
changes by 90, until the crash is read by what happens to each car.Trace event types
eml:run:starteml:assigneml:outputeml:run:done