Case 898

Half were vaccinated and the number stayed above one

half_were_vaccinated_and_the_number_stayed_above_one.eml - A campaign vaccinates half the population, the count is exact, the vaccine works, and the plan expects the outbreak to stop. What fraction has to be immune before each case infects fewer than one other is computed below.

ok: true — round-trip fixpoint reached (python1 == python2)updated 2026-09-18

EML

eml
# Self-authored for the EML case corpus (no external origin). A campaign
# vaccinates half the population, the count is exact, the vaccine works, and the
# plan expects the outbreak to stop. What fraction has to be immune before each
# case infects fewer than one other is computed below.
#
# The campaign is careful. It reaches exactly half of the real population; the
# vaccine gives full immunity; the coverage figure is honest; and the intent is
# exactly 'stop the outbreak'.
#
# Each case infects three others when everyone is susceptible, so an outbreak
# stops only when fewer than a third of contacts are susceptible - immunity has
# to reach two thirds, and at half coverage each case still infects one and a
# half.

3 => infections_per_case_when_all_susceptible
5000 => immune_per_myriad

10000 - int(10000 / infections_per_case_when_all_susceptible) => immunity_needed_per_myriad
10000 - immune_per_myriad => susceptible_per_myriad
int(infections_per_case_when_all_susceptible * susceptible_per_myriad / 100) => infections_per_case_now_hundredths
immunity_needed_per_myriad - immune_per_myriad => coverage_shortfall_per_myriad

"infections per case, no immunity : " + str(infections_per_case_when_all_susceptible) ^0
"immunity needed to stop it      : " + str(immunity_needed_per_myriad) + " per ten thousand" ^0
"immune after the campaign       : " + str(immune_per_myriad) + " per ten thousand" ^0
"still susceptible               : " + str(susceptible_per_myriad) + " per ten thousand" ^0
"infections per case now         : " + str(infections_per_case_now_hundredths) + " hundredths, above 100" ^0
"coverage shortfall              : " + str(coverage_shortfall_per_myriad) + " per ten thousand" ^0
"outbreak                        : still growing" ^0
"" ^0

# ---- what the campaign verified ----

"the vaccination campaign" ^0
"  reach : exactly half of the real population" ^0
"  vaccine : full immunity" ^0
"  coverage figure : honest, " + str(immune_per_myriad) + " per ten thousand" ^0
"  intent : stop the outbreak" ^0
"  doses miscounted : 0" ^0
"  verdict : HALF THE POPULATION IS IMMUNE" ^0
"" ^0
"  reaching exactly half with a vaccine that fully works is" ^0
"  the part done right here, and it is why half of every" ^0
"  case's contacts really are protected" ^0
"" ^0

# ---- what fraction stops the spread ----

"the threshold" ^0
"  a case meets its contacts : " + str(infections_per_case_when_all_susceptible) + " would be infected if all" ^0
"    were susceptible" ^0
"  with half immune : " + str(infections_per_case_now_hundredths) + " hundredths are infected per case" ^0
"  the outbreak stops when : each case infects fewer than one" ^0
"  that needs susceptibles below : one in " + str(infections_per_case_when_all_susceptible) ^0
"  so immunity must reach : " + str(immunity_needed_per_myriad) + " per ten thousand" ^0
"  half is : " + str(coverage_shortfall_per_myriad) + " per ten thousand short of that" ^0
"" ^0

# ---- what the campaign got ----

"the outbreak after the campaign" ^0
"  each case now infects : " + str(infections_per_case_now_hundredths) + " hundredths of a person" ^0
"  is that below one : no" ^0
"  is the coverage figure wrong : no; half really is immune" ^0
"  is half enough : not for a disease that spreads to three;" ^0
"    the threshold is a property of the disease, not a" ^0
"    round number" ^0
"" ^0

# ---- null control ----

# The same campaign sized to the disease's threshold: two thirds immune, so
# each case infects fewer than one other.
150 => nc_infections_per_case_at_half_hundredths
99 => nc_infections_per_case_at_two_thirds_hundredths
1 => nc_outbreak_stops_at_two_thirds

"null control - size the campaign to the threshold" ^0
"  infections per case at half : " + str(nc_infections_per_case_at_half_hundredths) + " hundredths" ^0
"  infections per case at two thirds : " + str(nc_infections_per_case_at_two_thirds_hundredths) + " hundredths" ^0
"  outbreak stops at two thirds : " + str(nc_outbreak_stops_at_two_thirds) ^0
"  no vaccine and no dose changed; the target stopped being" ^0
"  a fraction chosen for its roundness" ^0
"" ^0

# ---- the rule ----

"what a half-the-population campaign guarantees" ^0
"  half of every case's contacts are immune : exactly, real" ^0
"    reach, a working vaccine" ^0
"  the outbreak stops : not addressed; each case would infect" ^0
"    " + str(infections_per_case_when_all_susceptible) + ", so it still infects " + str(infections_per_case_now_hundredths) + " hundredths with half immune, and" ^0
"    stopping needs " + str(immunity_needed_per_myriad) + " per ten thousand" ^0
"" ^0

"immunity protects the immune at once and the population only past a line;" ^0
"the line is set by how far the disease reaches, not by how much was done," ^0
"and half of a job whose threshold is two thirds is a job the outbreak does" ^0
"not notice" ^0
"" ^0

"It reaches exactly half the population with a vaccine that fully works - half" ^0
"of every case's contacts are protected. But each case would infect " + str(infections_per_case_when_all_susceptible) + ", so it" ^0
"still infects " + str(infections_per_case_now_hundredths) + " hundredths, above one; stopping needs " + str(immunity_needed_per_myriad) + " per ten thousand" ^0
"immune, " + str(coverage_shortfall_per_myriad) + " short, until the campaign is sized to the disease's threshold." ^0

Python (deterministic transpilation)

python
infections_per_case_when_all_susceptible = 3
immune_per_myriad = 5000
immunity_needed_per_myriad = 10000 - int(10000 / infections_per_case_when_all_susceptible)
susceptible_per_myriad = 10000 - immune_per_myriad
infections_per_case_now_hundredths = int(infections_per_case_when_all_susceptible * susceptible_per_myriad / 100)
coverage_shortfall_per_myriad = immunity_needed_per_myriad - immune_per_myriad
print("infections per case, no immunity : " + str(infections_per_case_when_all_susceptible))
print("immunity needed to stop it      : " + str(immunity_needed_per_myriad) + " per ten thousand")
print("immune after the campaign       : " + str(immune_per_myriad) + " per ten thousand")
print("still susceptible               : " + str(susceptible_per_myriad) + " per ten thousand")
print("infections per case now         : " + str(infections_per_case_now_hundredths) + " hundredths, above 100")
print("coverage shortfall              : " + str(coverage_shortfall_per_myriad) + " per ten thousand")
print("outbreak                        : still growing")
print("")
print("the vaccination campaign")
print("  reach : exactly half of the real population")
print("  vaccine : full immunity")
print("  coverage figure : honest, " + str(immune_per_myriad) + " per ten thousand")
print("  intent : stop the outbreak")
print("  doses miscounted : 0")
print("  verdict : HALF THE POPULATION IS IMMUNE")
print("")
print("  reaching exactly half with a vaccine that fully works is")
print("  the part done right here, and it is why half of every")
print("  case's contacts really are protected")
print("")
print("the threshold")
print("  a case meets its contacts : " + str(infections_per_case_when_all_susceptible) + " would be infected if all")
print("    were susceptible")
print("  with half immune : " + str(infections_per_case_now_hundredths) + " hundredths are infected per case")
print("  the outbreak stops when : each case infects fewer than one")
print("  that needs susceptibles below : one in " + str(infections_per_case_when_all_susceptible))
print("  so immunity must reach : " + str(immunity_needed_per_myriad) + " per ten thousand")
print("  half is : " + str(coverage_shortfall_per_myriad) + " per ten thousand short of that")
print("")
print("the outbreak after the campaign")
print("  each case now infects : " + str(infections_per_case_now_hundredths) + " hundredths of a person")
print("  is that below one : no")
print("  is the coverage figure wrong : no; half really is immune")
print("  is half enough : not for a disease that spreads to three;")
print("    the threshold is a property of the disease, not a")
print("    round number")
print("")
nc_infections_per_case_at_half_hundredths = 150
nc_infections_per_case_at_two_thirds_hundredths = 99
nc_outbreak_stops_at_two_thirds = 1
print("null control - size the campaign to the threshold")
print("  infections per case at half : " + str(nc_infections_per_case_at_half_hundredths) + " hundredths")
print("  infections per case at two thirds : " + str(nc_infections_per_case_at_two_thirds_hundredths) + " hundredths")
print("  outbreak stops at two thirds : " + str(nc_outbreak_stops_at_two_thirds))
print("  no vaccine and no dose changed; the target stopped being")
print("  a fraction chosen for its roundness")
print("")
print("what a half-the-population campaign guarantees")
print("  half of every case's contacts are immune : exactly, real")
print("    reach, a working vaccine")
print("  the outbreak stops : not addressed; each case would infect")
print("    " + str(infections_per_case_when_all_susceptible) + ", so it still infects " + str(infections_per_case_now_hundredths) + " hundredths with half immune, and")
print("    stopping needs " + str(immunity_needed_per_myriad) + " per ten thousand")
print("")
print("immunity protects the immune at once and the population only past a line;")
print("the line is set by how far the disease reaches, not by how much was done,")
print("and half of a job whose threshold is two thirds is a job the outbreak does")
print("not notice")
print("")
print("It reaches exactly half the population with a vaccine that fully works - half")
print("of every case's contacts are protected. But each case would infect " + str(infections_per_case_when_all_susceptible) + ", so it")
print("still infects " + str(infections_per_case_now_hundredths) + " hundredths, above one; stopping needs " + str(immunity_needed_per_myriad) + " per ten thousand")
print("immune, " + str(coverage_shortfall_per_myriad) + " short, until the campaign is sized to the disease's threshold.")

stdout (executed)

text
infections per case, no immunity : 3
immunity needed to stop it      : 6667 per ten thousand
immune after the campaign       : 5000 per ten thousand
still susceptible               : 5000 per ten thousand
infections per case now         : 150 hundredths, above 100
coverage shortfall              : 1667 per ten thousand
outbreak                        : still growing

the vaccination campaign
  reach : exactly half of the real population
  vaccine : full immunity
  coverage figure : honest, 5000 per ten thousand
  intent : stop the outbreak
  doses miscounted : 0
  verdict : HALF THE POPULATION IS IMMUNE

  reaching exactly half with a vaccine that fully works is
  the part done right here, and it is why half of every
  case's contacts really are protected

the threshold
  a case meets its contacts : 3 would be infected if all
    were susceptible
  with half immune : 150 hundredths are infected per case
  the outbreak stops when : each case infects fewer than one
  that needs susceptibles below : one in 3
  so immunity must reach : 6667 per ten thousand
  half is : 1667 per ten thousand short of that

the outbreak after the campaign
  each case now infects : 150 hundredths of a person
  is that below one : no
  is the coverage figure wrong : no; half really is immune
  is half enough : not for a disease that spreads to three;
    the threshold is a property of the disease, not a
    round number

null control - size the campaign to the threshold
  infections per case at half : 150 hundredths
  infections per case at two thirds : 99 hundredths
  outbreak stops at two thirds : 1
  no vaccine and no dose changed; the target stopped being
  a fraction chosen for its roundness

what a half-the-population campaign guarantees
  half of every case's contacts are immune : exactly, real
    reach, a working vaccine
  the outbreak stops : not addressed; each case would infect
    3, so it still infects 150 hundredths with half immune, and
    stopping needs 6667 per ten thousand

immunity protects the immune at once and the population only past a line;
the line is set by how far the disease reaches, not by how much was done,
and half of a job whose threshold is two thirds is a job the outbreak does
not notice

It reaches exactly half the population with a vaccine that fully works - half
of every case's contacts are protected. But each case would infect 3, so it
still infects 150 hundredths, above one; stopping needs 6667 per ten thousand
immune, 1667 short, until the campaign is sized to the disease's threshold.

Trace event types

eml:run:starteml:assigneml:outputeml:run:done