Elections you can recount.
Apportionment math lives in statutes, spreadsheets, and someone's R script — and when the result is contested, none of them is an audit trail. In Grid the allocation is a native audited kernel cross-checked against pure formulas in the same model, and a forecast is seeded — anyone can rerun it and get the same answer.
Monday morning, as source.
votes = [100000, 60000, 20000] house = 6 # native audited kernel seats = APPORTION(votes, house, "d'hondt") conserved = SUM(seats) = house # gerrymander math, named gap = EFFICIENCY_GAP(party_a_votes, party_b_votes)
This is adapted from a canonical model that builds the D'Hondt quotient table in pure Grid and calls the native kernel — and asserts they agree.
Audited kernels
APPORTION, ballot tabulation, and partisan-fairness measures are named, versioned functions — the statute math, not a macro.
Civic & elections functions →Reproducible by seed
Election forecasts use seeded polling uncertainty and uniform swing — the same inputs produce the same seat probabilities, every run, on anyone's machine.
Simulation →Shared civic modules
USE "shared/politics.gs" imports vetted definitions — quotient rules, effective-party counts — so every analysis starts from the same math.
Modules & imports →