Algorithm Search⌘K

Algorithmintro

D'Hondt method

Also called Jefferson method, greatest divisors method.

Assigns seats one at a time to the party with the largest votes divided by one plus its seats. It favours large parties.

Time
O(n + h log n) worst
Space
O(n) extra
Where
h = the number of seats; n = the number of parties
Properties
comparison baseddeterministiciterative
Origin
Thomas Jefferson, Victor D'Hondt, 1792

The D'Hondt method apportions hh seats among parties or states in proportion to their votes. It gives the seats one at a time, each to the party with the largest quotient of its votes divided by one more than its seats so far. It is the same as Jefferson's method, the divisor method that rounds every quota down. It has none of the paradoxes of Hamilton's method, and it never gives a party less than its lower quota, but it can give a large party more than its upper quota.

In plain words

Write each party's vote total at the top of a column. Below it write the total divided by 2, by 3, by 4, and so on. Now give the seats to the largest numbers in the whole table, one seat for each number, until all seats are gone. A party with twice the votes of another gets about twice the seats. Small parties are cut a little: the method rounds down, and the rounding hurts a party with few seats the most.

The problem

The input is the votes p1,…,pn≥0p_1, \ldots, p_n \ge 0, integers with sum P>0P > 0, and the number of seats hh. The output is integers ai≥0a_i \ge 0 with ∑iai=h\sum_i a_i = h. The quota of party ii is qi=hpi/Pq_i = h p_i / P. See the apportionment problem for the setting and the other methods.

Jefferson's method in divisor form is: find a divisor λ>0\lambda > 0 such that ∑i⌊pi/λ⌋=h\sum_i \lfloor p_i / \lambda \rfloor = h, and give party ii the seats ai=⌊pi/λ⌋a_i = \lfloor p_i / \lambda \rfloor. The D'Hondt rule in highest averages form gives each seat to the party with the largest pi/(ai+1)p_i/(a_i + 1), ties to the smallest index. The two forms give the same apportionments.

The algorithm

A priority queue holds one key per party, its next quotient. A binary heap compares two keys pi/dip_i/d_i and pj/djp_j/d_j by the integers pidjp_i d_j and pjdip_j d_i, with no division.

  1. D'HONDT(p, h) ▷ p = (p_1, ..., p_n) votes, h seats
  2. 1a_i ← 0 for each i
  3. 2Q ← a max-priority queue of the parties, with keys p_i / 1
  4. 3repeat h times
  5. 4i ← extract from Q the largest key, the smallest index among ties
  6. 5a_i ← a_i + 1
  7. 6insert i into Q with key p_i / (a_i + 1)
  8. 7return a

Each pass of lines L3 to L6 gives one seat and puts the party back with its next quotient.

Example

Four parties have 100000, 80000, 30000 and 20000 votes, and h=8h = 8 seats are to be filled. The table lists the quotients pi/dp_i / d; the numbers in bold get the seats, in the order given in brackets.

divisor party 1 party 2 party 3 party 4
1 100000 (1) 80000 (2) 30000 (6) 20000
2 50000 (3) 40000 (4) 15000 10000
3 33333 (5) 26667 (7) 10000 6667
4 25000 (8) 20000 7500 5000
5 20000 16000 6000 4000

The result is (4,3,1,0)(4, 3, 1, 0). The quotas are 3.483.48, 2.782.78, 1.041.04 and 0.700.70, so party 1 gets its upper quota and party 4 its lower quota 0. Hamilton's method, the Sainte-Lague method and the Huntington-Hill method all give (3,3,1,1)(3, 3, 1, 1). Any divisor λ\lambda with 20000<λ≤2500020000 < \lambda \le 25000 gives the same result in divisor form: for λ=22000\lambda = 22000, ⌊100000/22000⌋=4\lfloor 100000/22000 \rfloor = 4, ⌊80000/22000⌋=3\lfloor 80000/22000 \rfloor = 3, ⌊30000/22000⌋=1\lfloor 30000/22000 \rfloor = 1 and ⌊20000/22000⌋=0\lfloor 20000/22000 \rfloor = 0. The ninth seat is a three-way tie at 20000, between parties 1, 2 and 4; the smallest index gives it to party 1.

Correctness

The proof shows that the keys of the seats, in the order they are given, never increase. Let ℓ\ell be the largest key left at the end and u=min⁡ipi/aiu = \min_i p_i/a_i the smallest key that won a seat. Then ℓ≤u\ell \le u, and every λ\lambda with ℓ<λ≤u\ell < \lambda \le u gives ai=⌊pi/λ⌋a_i = \lfloor p_i/\lambda \rfloor for every party. So the highest averages rule computes Jefferson's divisor method, and its result is unique when ℓ<u\ell < u. The proof also shows lower quota, the least-cost form below, house monotonicity and population monotonicity.

Proof: Correctness and properties of the D'Hondt methodfull

Let p1,…,pn≥0p_1, \ldots, p_n \ge 0 be integers with P=∑ipi>0P = \sum_i p_i > 0, and let h≥0h \ge 0. The quota of party ii is qi=hpi/Pq_i = h p_i / P. The greedy rule gives hh seats one at a time; each goes to the party with the largest key pi/(ai+1)p_i/(a_i + 1), where aia_i is its current number of seats, the smallest index among ties.

Claim 1 (the heap). The method of the page gives the same seats as the greedy rule.

Proof. The order used by the heap compares pi/dip_i/d_i and pj/djp_j/d_j by the products pidjp_i d_j and pjdip_j d_i, which is exact since di,dj>0d_i, d_j > 0, and breaks ties by the smaller index. It is a strict total order on the keys. At each pass of line L3 the heap holds exactly one key per party, pi/(ai+1)p_i/(a_i + 1): this holds after line L2, and lines L4 to L6 remove the key of ii and insert its new one. So line L4 removes the key that the greedy rule picks.

Claim 2 (the keys do not increase). Let w1,w2,…,whw_1, w_2, \ldots, w_h be the keys of the seats in the order they are given. Then w1≥w2≥⋯≥wh≥ℓw_1 \ge w_2 \ge \cdots \ge w_h \ge \ell, where ℓ=max⁡ipi/(ai+1)\ell = \max_i p_i/(a_i + 1) for the final seats aa.

Proof. Each wtw_t is the largest key at time tt. Giving the seat changes only the key of the winner, from pi/(ai+1)p_i/(a_i + 1) to the smaller value pi/(ai+2)p_i/(a_i + 2). So the largest key never increases, and ℓ\ell is the largest key at the end.

Claim 3 (divisor form). Let u=min⁡i:ai≥1pi/aiu = \min_{i : a_i \ge 1} p_i / a_i (or u=∞u = \infty if h=0h = 0). Then ℓ≤u\ell \le u, and for every λ\lambda with ℓ<λ≤u\ell < \lambda \le u, ai=⌊pi/λ⌋a_i = \lfloor p_i / \lambda \rfloor for every ii. Conversely, if some λ>0\lambda > 0 gives ∑i⌊pi/λ⌋=h\sum_i \lfloor p_i/\lambda \rfloor = h, then bi=⌊pi/λ⌋b_i = \lfloor p_i/\lambda \rfloor satisfies max⁡ipi/(bi+1)<λ≤min⁡i:bi≥1pi/bi\max_i p_i/(b_i + 1) < \lambda \le \min_{i : b_i \ge 1} p_i/b_i. So the output of the method is an apportionment of Jefferson's divisor method, and it is the only one when ℓ<u\ell < u.

Proof. The seats of party ii had the keys pi/1,…,pi/aip_i/1, \ldots, p_i/a_i, so pi/aip_i/a_i is one of the wtw_t, and by Claim 2 it is at least ℓ\ell. So u≥ℓu \ge \ell. If ℓ<λ≤u\ell < \lambda \le u, then pi/(ai+1)≤ℓ<λp_i/(a_i + 1) \le \ell < \lambda gives pi/λ<ai+1p_i/\lambda < a_i + 1, and, for ai≥1a_i \ge 1, λ≤pi/ai\lambda \le p_i/a_i gives pi/λ≥aip_i/\lambda \ge a_i; for ai=0a_i = 0 this is trivial. So ai=⌊pi/λ⌋a_i = \lfloor p_i/\lambda \rfloor. The converse is the definition of the floor: bi≤pi/λ<bi+1b_i \le p_i/\lambda < b_i + 1. If ℓ<u\ell < u, any other vector bb of the divisor form with sum hh has its own interval (ℓb,ub](\ell_b, u_b], and b≠ab \ne a forces some bi>aib_i > a_i and some bj<ajb_j < a_j, so λb≤pi/bi≤pi/(ai+1)≤ℓ\lambda_b \le p_i/b_i \le p_i/(a_i + 1) \le \ell and λb>pj/(bj+1)≥pj/aj≥u\lambda_b > p_j/(b_j + 1) \ge p_j/a_j \ge u, which contradicts ℓ<u\ell < u.

Claim 4 (lower quota). ai≥⌊qi⌋a_i \ge \lfloor q_i \rfloor for every ii.

Proof. Suppose ai<⌊qi⌋a_i < \lfloor q_i \rfloor, so ai+1≤qia_i + 1 \le q_i. Then ℓ≥pi/(ai+1)≥pi/qi=P/h\ell \ge p_i/(a_i + 1) \ge p_i/q_i = P/h. For every party jj with aj≥1a_j \ge 1, Claim 3 gives pj/aj≥ℓ≥P/hp_j/a_j \ge \ell \ge P/h, so aj≤qja_j \le q_j. Then h=∑jaj≤∑j≠iqj+ai<∑jqj=hh = \sum_j a_j \le \sum_{j \ne i} q_j + a_i < \sum_j q_j = h, a contradiction.

Claim 5 (upper quota fails). With p=(8,2,1,1)p = (8, 2, 1, 1) and h=7h = 7, the method gives (6,1,0,0)(6, 1, 0, 0), but q1=14/3<5q_1 = 14/3 < 5.

Proof. The keys of party 1 are 8,4,8/3,2,8/5,4/3,8/78, 4, 8/3, 2, 8/5, 4/3, 8/7, of party 2 they are 2,1,…2, 1, \ldots, and parties 3 and 4 have 11. In decreasing order the first seven keys are 8,4,8/3,2,2,8/5,4/38, 4, 8/3, 2, 2, 8/5, 4/3, and only one of them belongs to party 2. Here ℓ=max⁡(8/7,1,1,1)=8/7<u=4/3\ell = \max(8/7, 1, 1, 1) = 8/7 < u = 4/3, so there is no tie.

Claim 6 (least cost). If every pi>0p_i > 0, the output minimizes F(b)=∑ibi(bi+1)/piF(b) = \sum_i b_i (b_i + 1)/p_i over all integer vectors b≥0b \ge 0 with ∑ibi=h\sum_i b_i = h.

Proof. F(b)=∑i∑x=0bi−1ci(x)F(b) = \sum_i \sum_{x = 0}^{b_i - 1} c_i(x) with the marginal costs ci(x)=2(x+1)/pic_i(x) = 2(x + 1)/p_i, which increase in xx. So F(b)F(b) is a sum of hh marginal costs, taken as a prefix from each party, and it is at least the sum of the hh smallest marginal costs over all pairs (i,x)(i, x). Because each party's costs increase, the hh smallest costs form a prefix of each party, so some bb reaches this bound. The greedy rule takes at each step the smallest cost ci(ai)c_i(a_i) left, which is the largest key pi/(ai+1)p_i/(a_i + 1), so it takes the hh smallest costs.

Claim 7 (no paradoxes). The method is house monotone: the seats for h+1h + 1 are those for hh plus one seat. And it is population monotone: if the populations change from pp to p′p' (and the house from hh to h′h'), with pi′≥pip'_i \ge p_i and pj′≤pjp'_j \le p_j, then it cannot happen that ai′<aia'_i < a_i and aj′>aja'_j > a_j, unless both apportionments come from a tie (ℓ=u\ell = u).

Proof. The greedy rule for h+1h + 1 seats repeats the first hh steps of the rule for hh seats. For the second part, take λ∈[ℓ,u]\lambda \in [\ell, u] for pp and λ′∈[ℓ′,u′]\lambda' \in [\ell', u'] for p′p', so that pk/(ak+1)≤λ≤pk/akp_k/(a_k + 1) \le \lambda \le p_k/a_k for all kk, and the same for p′p'. Suppose ai′<aia'_i < a_i and aj′>aja'_j > a_j. Then ai≥1a_i \ge 1, ai′+1≤aia'_i + 1 \le a_i and aj′≥aj+1a'_j \ge a_j + 1, so

λ′≥pi′ai′+1≥piai≥λ≥pjaj+1≥pj′aj′≥λ′.\lambda' \ge \frac{p'_i}{a'_i + 1} \ge \frac{p_i}{a_i} \ge \lambda \ge \frac{p_j}{a_j + 1} \ge \frac{p'_j}{a'_j} \ge \lambda'.

So all are equal, and pi/ai=pj/(aj+1)p_i/a_i = p_j/(a_j + 1) gives u≤ℓu \le \ell, a tie.

Complexity

Building the heap takes O(n)O(n) time, and each of the hh seats costs O(log⁡n)O(\log n), so the total is O(n+hlog⁡n)O(n + h \log n), with O(n)O(n) extra space. A linear scan for the largest key instead of the heap gives O(nh)O(n h). Cheng and Eppstein (2014) solve every divisor method in O(n)O(n) time, independent of hh: they start from an estimate of λ\lambda near P/hP/h, which leaves only O(n)O(n) seats to place, and they place them by selection. The comparisons use products of numbers of O(log⁡P+log⁡h)O(\log P + \log h) bits.

Properties

  • Lower quota. Every party gets at least ⌊qi⌋\lfloor q_i \rfloor. Jefferson's method is the only divisor method with this property (Balinski and Young 1975).
  • Upper quota fails. With votes (8,2,1,1)(8, 2, 1, 1) and h=7h = 7, the method gives (6,1,0,0)(6, 1, 0, 0), while the quota of party 1 is 14/3=4.6714/3 = 4.67. There is no tie in this example.
  • House monotone. One more seat never takes a seat from anyone, so there is no Alabama paradox.
  • Population monotone. If party ii gains votes and party jj loses votes, ii does not lose a seat to jj, except through a tie.
  • Bias to large parties. Rounding down favors the parties with many seats. In the example, the largest party gets its upper quota, and the smallest gets nothing.
  • Least cost. The result minimizes ∑iai(ai+1)/pi\sum_i a_i (a_i + 1)/p_i, because the cost of the next seat of party ii, 2(ai+1)/pi2(a_i + 1)/p_i, grows with aia_i, and the method always takes the cheapest next seat.

Variants and improvements

  • Other divisors. The Sainte-Lague method divides by 2a+12a + 1 and rounds at one half. The Huntington-Hill method rounds at the geometric mean a(a+1)\sqrt{a (a + 1)}. Adams's method rounds up, the mirror of Jefferson's, and favors small parties.
  • Thresholds. Many laws give no seats to lists below a share of the votes, such as 3 or 5 percent, and run the method on the others.
  • Biproportional apportionment. Seats are apportioned to parties and to districts at the same time, with one divisor per party and one per district.
  • A quota with a cap. Balinski and Young's quota method gives seats one at a time like D'Hondt, but only to parties still below their upper quota.

When to use it

Use the D'Hondt method for party lists when stable majorities matter more than exact proportionality for small parties, or when the law asks for it. It is simple to compute and to check, it has no paradoxes, and it never denies a party its lower quota. If small parties must be treated as fairly as large ones, the Sainte-Lague method is unbiased. If every party must stay within quota, use Hamilton's method, at the price of its paradoxes.

Pitfalls

  • Floating point. Quotients such as 100000/3100000/3 and 80000/380000/3 are not exact in floating point, and ties like the three-way tie at 20000 in the example can be decided by rounding errors. Compare pidjp_i d_j with pjdip_j d_i.
  • Ties. The law must say how to break a tie for the last seat. This page gives it to the smallest index; real laws often use the larger vote total or a lot.
  • Divisors from 1. The divisors are 1,2,3,…1, 2, 3, \ldots. With divisors 2,3,4,…2, 3, 4, \ldots (the Imperiali method) or 1.4,3,5,…1.4, 3, 5, \ldots (a modified Sainte-Lague), the result differs.
  • Zero votes. A party with no votes has key 0. It can get a seat only if every other key is 0, which needs P=0P = 0, an invalid input.

Implementations

Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.

dhondt_method.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/dhondt-method/. The authors are listed in prov/0Y9DP6.jsonl.

import heapq
from typing import Sequence


class _Key:
    """The priority p / d of state i in a min-heap: a larger quotient comes first, then a smaller index.

    Quotients are compared by cross multiplication, never by division.
    """

    __slots__ = ("p", "d", "i")

    def __init__(self, p: int, d: int, i: int) -> None:
        self.p, self.d, self.i = p, d, i

    def __lt__(self, other: "_Key") -> bool:
        x, y = self.p * other.d, other.p * self.d
        if x != y:
            return x > y
        return self.i < other.i


def dhondt_method(votes: Sequence[int], h: int) -> list[int]:
    """Apportion h seats by the D'Hondt method (Jefferson's method).

    votes are nonnegative integers with a positive sum. Each of the h seats goes to the party
    with the largest quotient votes[i] / (a[i] + 1), where a[i] is its number of seats so far,
    the smallest index among ties. A heap holds one quotient per party.
    """
    if h < 0 or any(v < 0 for v in votes) or sum(votes) <= 0:
        raise ValueError("need h >= 0, votes >= 0 and a positive total")
    n = len(votes)
    a = [0] * n  # @line L1
    heap = [_Key(v, 1, i) for i, v in enumerate(votes)]  # @line L2
    heapq.heapify(heap)
    for _ in range(h):  # @line L3
        i = heapq.heappop(heap).i  # @line L4
        a[i] += 1  # @line L5
        heapq.heappush(heap, _Key(votes[i], a[i] + 1, i))  # @line L6
    return a  # @line L7
test_dhondt_method.py 139 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/dhondt-method/. The authors are listed in prov/0Y9DP6.jsonl.

import random
import unittest
from fractions import Fraction

from dhondt_method import dhondt_method


def compositions(h, n):
    """Yield every list of n nonnegative integers with sum h."""
    if n == 1:
        yield [h]
        return
    for x in range(h + 1):
        for rest in compositions(h - x, n - 1):
            yield [x] + rest


def by_scan(votes, h):
    """A second implementation: a linear scan for each seat, with Fraction quotients."""
    a = [0] * len(votes)
    for _ in range(h):
        best = max(range(len(votes)), key=lambda i: (Fraction(votes[i], a[i] + 1), -i))
        a[best] += 1
    return a


def gap(votes, a):
    """Return (low, high): the largest votes / (seats + 1) and the smallest votes / seats.

    a is a D'Hondt apportionment exactly when low <= high; it is the only one when low < high.
    """
    low = max(Fraction(v, x + 1) for v, x in zip(votes, a))
    high = min((Fraction(v, x) for v, x in zip(votes, a) if x > 0), default=None)
    return low, high


def is_jefferson(votes, a):
    low, high = gap(votes, a)
    return high is None or low <= high


def quotas(votes, h):
    return [Fraction(h * v, sum(votes)) for v in votes]


def floor(x):
    return x.numerator // x.denominator


class TestCheckValues(unittest.TestCase):
    V = [100000, 80000, 30000, 20000]

    def test_eight_seats(self):
        self.assertEqual(dhondt_method(self.V, 8), [4, 3, 1, 0])

    def test_sequence(self):
        got = [dhondt_method(self.V, h) for h in range(1, 8)]
        self.assertEqual(got, [[1, 0, 0, 0], [1, 1, 0, 0], [2, 1, 0, 0], [2, 2, 0, 0], [3, 2, 0, 0], [3, 2, 1, 0], [3, 3, 1, 0]])

    def test_three_way_tie(self):
        a = dhondt_method(self.V, 8)
        tied = [Fraction(v, x + 1) for v, x in zip(self.V, a)]
        self.assertEqual(tied.count(Fraction(20000)), 3)
        self.assertEqual(dhondt_method(self.V, 9), [5, 3, 1, 0])

    def test_upper_quota_violation(self):
        p, h = [8, 2, 1, 1], 7
        self.assertEqual(dhondt_method(p, h), [6, 1, 0, 0])
        self.assertEqual(quotas(p, h)[0], Fraction(14, 3))
        low, high = gap(p, [6, 1, 0, 0])
        self.assertLess(low, high)

    def test_errors(self):
        for p, h in (([0, 0], 3), ([1, -1, 2], 2), ([1, 2], -1)):
            with self.assertRaises(ValueError):
                dhondt_method(p, h)


class TestProperties(unittest.TestCase):
    def test_against_scan_and_divisor_form(self):
        rng = random.Random(31)
        for _ in range(1500):
            n = rng.randint(1, 7)
            p = [rng.randint(0, 500) for _ in range(n)]
            if sum(p) == 0:
                continue
            h = rng.randint(0, 30)
            a = dhondt_method(p, h)
            self.assertEqual(sum(a), h)
            self.assertEqual(a, by_scan(p, h))
            self.assertTrue(is_jefferson(p, a))
            low, high = gap(p, a)
            if high is not None and low < high and low > 0:
                lam = (low + high) / 2
                self.assertEqual([floor(Fraction(v) / lam) for v in p], a)
            for x, q in zip(a, quotas(p, h)):
                self.assertGreaterEqual(x, floor(q))

    def test_brute_force(self):
        rng = random.Random(32)
        for _ in range(250):
            n = rng.randint(1, 4)
            p = [rng.randint(1, 60) for _ in range(n)]
            h = rng.randint(0, 9)
            a = dhondt_method(p, h)
            divisor = [b for b in compositions(h, n) if is_jefferson(p, b)]
            self.assertIn(a, divisor)
            low, high = gap(p, a)
            if high is None or low < high:
                self.assertEqual(divisor, [a])
            cost = lambda b: sum(Fraction(x * (x + 1), v) for x, v in zip(b, p))
            self.assertEqual(cost(a), min(cost(b) for b in compositions(h, n)))

    def test_house_and_population_monotone(self):
        rng = random.Random(33)
        for _ in range(600):
            n = rng.randint(2, 5)
            p = [rng.randint(1, 100) for _ in range(n)]
            h = rng.randint(1, 15)
            a = dhondt_method(p, h)
            b = dhondt_method(p, h + 1)
            self.assertTrue(all(y >= x for x, y in zip(a, b)))
            p2 = [max(1, v + rng.randint(-30, 30)) for v in p]
            a2 = dhondt_method(p2, h)
            l1, h1 = gap(p, a)
            l2, h2 = gap(p2, a2)
            if (h1 is not None and l1 == h1) or (h2 is not None and l2 == h2):
                continue
            for i in range(n):
                for j in range(n):
                    if i != j and p2[i] >= p[i] and p2[j] <= p[j]:
                        self.assertFalse(a2[i] < a[i] and a2[j] > a[j])


if __name__ == "__main__":
    unittest.main()

History

Thomas Jefferson proposed the method for the US House after the census of 1790. After Washington vetoed Hamilton's method in 1792, Congress adopted Jefferson's, and it was used until the census of 1830. Its bias to large states led to its end: after the census of 1830 it gave New York 40 seats, while its quota was about 38.6. Victor D'Hondt, a Belgian lawyer, proposed the same rule for party lists in the 1870s and 1880s, in the highest averages form, and Belgium adopted it. It is now one of the most used rules for party-list elections, for example in Spain and Portugal, and Balinski and Young (1975, 1982) showed that it is the only divisor method that satisfies lower quota.

References

  1. Michel L. Balinski and H. Peyton Young, Fair Representation: Meeting the Ideal of One Man, One Vote, 2nd edition, Brookings Institution Press, 2001, Chapter 3 (The Methods of Jefferson and Hamilton), Chapter 10 (Staying within the Quota) and Appendix A (The Theory of Apportionment)
  2. M. L. Balinski and H. P. Young, The quota method of apportionment, American Mathematical Monthly 82(7) (1975), 701-730, Jefferson's method is the only divisor method that satisfies lower quota
  3. Zhanpeng Cheng and David Eppstein, Linear-time algorithms for proportional apportionment, Proc. 25th International Symposium on Algorithms and Computation (ISAAC 2014), LNCS 8889, 581-592, divisor methods in O(n) time, independent of the number of seats

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH1 sketch
  • a full proof of time.worst
  • a full proof of space.extra
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
Code (python)I0 not checked yet
  • the tests did not run in this build
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a scene preset for the example