Algorithm Search⌘K

Algorithmadvanced

Geometric partitioning

Also called Lester-Moffat-Zobel geometric partitioning.

Keeps index partitions whose sizes grow geometrically by a ratio r, or at most p of them, trading merge cost against the number of partitions a query reads.

Time
O(r T log(T/b) / log r) buildO(T (T/b)^(1/p)) build_fixed_pO(r log(T/b) / log r) amortized insertO(log(T/b) / log r) partitions_per_query
Space
O(T) diskO(b) memory
Where
T = the number of postings added so far; b = the number of postings in the in-memory buffer; m = the number of buffer flushes (the floor of T/b); p = the bound on the number of partitions in the fixed-p variant; r = the radix (the ratio between partition sizes)
Properties
comparison baseddeterministicnot in placeonlineiterative

Geometric partitioning keeps an inverted index up to date while documents arrive, by holding the index in a few partitions on disk whose sizes grow by a factor rr from one level to the next. A full in-memory buffer of bb postings is merged with the smaller partitions in one multiway merge, and the partitions behave like the digits of a counter in base rr. Lester, Moffat and Zobel proposed it in 2005, with a second form that fixes the number of partitions at pp and lets rr grow. Logarithmic merging is close to the case r=2r = 2, but it merges pairwise; this page covers the general radix, the cost in postings written as a function of rr, and the fixed-pp form. The log-structured merge tree uses the same idea for key-value stores.

In plain words

A growing index on disk can be kept as one big file, but then each batch of new documents forces a rewrite of the whole file. It can also be kept as many small files, but then each search has to open all of them. Geometric partitioning is a middle way. It keeps a few files, each one about rr times larger than the one before. New documents fill a buffer in memory. When the buffer is full, it is joined with the small files into one new file. Large files are rewritten only rarely. A larger rr means fewer files to search but more rewriting. A smaller rr means less rewriting but more files.

The problem

Postings arrive one at a time. After each arrival a query for a term must return its full posting list. The cost to measure is the number of postings written to disk by merges, and the number of partitions a query must read. With one partition, the remerge strategy, each flush rewrites the whole index, and mm flushes write b(1+2+⋯+m)=Θ(m2b)b(1 + 2 + \cdots + m) = \Theta(m^2 b) postings. With no merge at all, a query reads mm partitions. The general problem is dynamic index maintenance.

The algorithm

Partition PkP_k, for k=1,2,…k = 1, 2, \ldots, is one sorted index on disk. It is either empty or holds j⋅rk−1bj \cdot r^{k-1} b postings with 1≤j≤r−11 \le j \le r - 1, so it is full when it holds (r−1)rk−1b(r - 1) r^{k-1} b. ZZ is the buffer in memory.

  1. GEOM-ADD(x) ▷ r ≥ 2, buffer capacity b
  2. 1add x to the buffer Z
  3. 2if |Z| = b then
  4. 3k ← 1
  5. 4while P_k holds (r - 1) r^(k-1) b postings do k ← k + 1
  6. 5P_k ← MULTIWAY-MERGE(Z, P_1, ..., P_k) ▷ one pass, written to disk
  7. 6make Z and P_1, ..., P_(k-1) empty
  8. QUERY(t)
  9. 7read the list of t from Z and from each partition that is not empty
  10. 8return the union of these lists, in increasing document id order

Line L1 puts the posting in the buffer. When the buffer is full (line L2), lines L3 and L4 look for the first partition that is not full. Line L5 merges the buffer with all partitions up to that one in a single pass, as a k-way merge, and stores the result as the new PkP_k. The partitions below kk were full, so their content now sits in PkP_k, and line L6 empties them. Because P1,…,Pk−1P_1, \ldots, P_{k-1} held (r−1)(1+r+⋯+rk−2)b=(rk−1−1)b(r - 1)(1 + r + \cdots + r^{k-2}) b = (r^{k-1} - 1) b postings, the buffer and these partitions add exactly rk−1br^{k-1} b postings to PkP_k, one unit of its level. So, after mm flushes, PkP_k holds δkrk−1b\delta_k r^{k-1} b postings, where δk\delta_k is digit kk of mm in base rr. Lines L7 and L8 answer a query from the buffer and all partitions.

Example

Take r=3r = 3 and count postings in units of bb. Nine flushes give this trace. The digits are those of the flush count in base 3, with P1P_1 on the right.

flush tt tt in base 3 first partition not full merged at line L5 sizes of P3,P2,P1P_3, P_2, P_1 after written
1 1 P1P_1 ZZ 0, 0, 1 1
2 2 P1P_1 ZZ, P1P_1 0, 0, 2 2
3 10 P2P_2 ZZ, P1P_1, P2P_2 0, 3, 0 3
4 11 P1P_1 ZZ 0, 3, 1 1
5 12 P1P_1 ZZ, P1P_1 0, 3, 2 2
6 20 P2P_2 ZZ, P1P_1, P2P_2 0, 6, 0 6
7 21 P1P_1 ZZ 0, 6, 1 1
8 22 P1P_1 ZZ, P1P_1 0, 6, 2 2
9 100 P3P_3 ZZ, P1P_1, P2P_2, P3P_3 9, 0, 0 9

The nine flushes write 27b27b postings, against (1+2+⋯+9)b=45b(1 + 2 + \cdots + 9) b = 45b for remerge into one index. The postings of flush 1 are written 5 times: twice at level 1, twice at level 2 and once at level 3. This is the case shown in the figure of Lester, Moffat and Zobel, nine bufferloads that end as one partition of 9b9b.

For a longer run, take m=1000m = 1000 flushes. The postings written, in units of bb, and the partitions are:

strategy postings written partitions that can exist nonempty after 1000 flushes
remerge, one partition 500,500 1 1
r=10r = 10 14,500 4 1
r=4r = 4 7,560 5 4
r=3r = 3 6,670 7 4
r=2r = 2 5,060 10 6

Correctness

After mm flushes and ss further postings, the buffer holds ss postings and partition PkP_k holds δkrk−1b\delta_k r^{k-1} b postings, where δk\delta_k is the kk-th digit of mm in base rr. A partition is full exactly when its digit is r−1r - 1. A flush finds the first digit below r−1r - 1, and the merge of line L5 holds b+(rk−1−1)b+δkrk−1b=(δk+1)rk−1bb + (r^{k-1} - 1) b + \delta_k r^{k-1} b = (\delta_k + 1) r^{k-1} b postings, which is the new digit δk+1\delta_k + 1 at level kk with all lower digits 0. This is the addition of 1 in base rr. Each merge moves postings and never copies them, so the buffer and the partitions hold disjoint sets whose union is everything added, and a query that takes the union of all lists is correct. The full proof is in the proof file below.

Proof: Geometric partitioning keeps all postings, follows a radix-r counter, and writes each posting at most (r-1)(1 + floor(log_r m)) timesfull

Fix the radix r≥2r \ge 2 and the buffer size b≥1b \ge 1. Let XX be the set of postings added so far, all distinct, with ∣X∣=T=mb+s|X| = T = mb + s and 0≤s<b0 \le s < b. So mm is the number of flushes. Write m=∑k≥1δkrk−1m = \sum_{k \ge 1} \delta_k r^{k-1} with base-rr digits 0≤δk≤r−10 \le \delta_k \le r - 1. We show that after each call of GEOM-ADD:

(G1) the buffer ZZ holds ss postings;

(G2) partition PkP_k holds exactly δkrk−1b\delta_k r^{k-1} b postings, for each k≥1k \ge 1;

(G3) ZZ and the partitions are pairwise disjoint, sorted, and their union is XX.

  1. Base. With XX empty, m=s=0m = s = 0, all digits are 0 and all partitions are empty.

  2. A call with no flush. Line L1 adds the new posting to ZZ in sorted position. If ∣Z∣<b|Z| < b after that, nothing else changes, ss grows by one, mm does not change, and the posting is new. (G1) to (G3) hold.

  3. A call with a flush. Else ∣Z∣=b|Z| = b after line L1. The capacity of PkP_k is (r−1)rk−1b(r - 1) r^{k-1} b, and by (G2) PkP_k is at capacity exactly when δk=r−1\delta_k = r - 1. Lines L3 and L4 find the least kk with δk<r−1\delta_k < r - 1. Such a kk exists because mm has finitely many nonzero digits. So δ1=⋯=δk−1=r−1\delta_1 = \cdots = \delta_{k-1} = r - 1. The merge of line L5 has b+∑i=1k−1(r−1)ri−1b+δkrk−1b=b+(rk−1−1)b+δkrk−1b=(δk+1)rk−1bb + \sum_{i=1}^{k-1} (r - 1) r^{i-1} b + \delta_k r^{k-1} b = b + (r^{k-1} - 1) b + \delta_k r^{k-1} b = (\delta_k + 1) r^{k-1} b postings. In base rr, adding 1 to mm turns the k−1k - 1 low digits r−1r - 1 into 0, adds 1 to digit kk, which is at most r−1r - 1 after the change, and leaves the higher digits alone. So after line L6, with P1,…,Pk−1P_1, \ldots, P_{k-1} and ZZ empty and PkP_k holding the merge result, (G2) holds for m+1m + 1, and (G1) holds with s=0s = 0. The merge of sorted disjoint lists gives their sorted union, and the postings of the merged sources are moved, not copied, so (G3) holds.

  4. Queries. By (G3), the list of a term over XX is the disjoint union of its lists in ZZ and in each partition. Lines L7 and L8 return it in document order.

  5. The size of each merge. Let flush number tt be the one that takes the count from t−1t - 1 to tt. The low digits of t−1t - 1 that equal r−1r - 1 are the low digits of tt that equal 0, so k−1=vr(t)k - 1 = v_r(t), the number of times rr divides tt, and by step 3 the merge writes (δk+1)rk−1b=(t mod rk) b(\delta_k + 1) r^{k-1} b = (t \bmod r^{k}) \, b postings, where δk+1\delta_k + 1 is digit kk of tt. The total after mm flushes is b∑t=1m(t mod rvr(t)+1)b \sum_{t=1}^{m} (t \bmod r^{v_r(t) + 1}).

  6. Writes of one posting. A posting is written once in each flush that includes it in line L5. Fix a level kk. The posting enters PkP_k in some flush, which sets digit kk to some value δ≥1\delta \ge 1 and writes the posting once. While it stays in PkP_k, it is written again only by flushes that stop at level kk, and each of them adds 1 to digit kk. A flush that stops at a higher level moves the posting out of PkP_k for good, because partitions only move postings to higher levels. Digit kk can grow from δ\delta to at most r−1r - 1, so the posting is written at most 1+(r−1−δ)≤r−11 + (r - 1 - \delta) \le r - 1 times at level kk. A flush can reach level kk only when m≥rk−1m \ge r^{k-1}, so the levels used satisfy k≤1+⌊log⁡rm⌋k \le 1 + \lfloor \log_r m \rfloor. Hence each posting is written at most (r−1)(1+⌊log⁡rm⌋)(r - 1)(1 + \lfloor \log_r m \rfloor) times, and the total over all postings is at most T(r−1)(1+⌊log⁡rm⌋)T (r - 1)(1 + \lfloor \log_r m \rfloor).

  7. The number of partitions. By (G2), the nonempty partitions are those with a nonzero digit, so at most 1+⌊log⁡rm⌋1 + \lfloor \log_r m \rfloor of them exist, and a query reads at most that many partitions plus the buffer. ■\blacksquare

Complexity

  • Merge size. Flush tt writes (t mod rv+1)b(t \bmod r^{v+1}) b postings, where vv is the number of times rr divides tt. After mm flushes the total is b∑t=1m(t mod rvr(t)+1)b \sum_{t=1}^{m} (t \bmod r^{v_r(t)+1}).
  • Writes for one posting. At each level a posting is written at most r−1r - 1 times: once when it enters the level and once for each later increase of that digit. The levels in use are at most 1+⌊log⁡rm⌋1 + \lfloor \log_r m \rfloor. So each posting is written at most (r−1)(1+⌊log⁡rm⌋)(r - 1)(1 + \lfloor \log_r m \rfloor) times, and the build costs O(rTlog⁡(T/b)/log⁡r)O(r T \log(T/b) / \log r) postings written. For r=2r = 2 this is O(Tlog⁡(T/b))O(T \log(T/b)), as for logarithmic merging.
  • Queries. A query reads the buffer and at most 1+⌊log⁡rm⌋1 + \lfloor \log_r m \rfloor partitions. A larger rr means fewer partitions and more writes.
  • Fixed number of partitions. If at most pp partitions may exist, the radix must grow with the index, to about (T/b)1/p(T/b)^{1/p}. Then each posting is written O((T/b)1/p)O((T/b)^{1/p}) times, and the build costs O(T(T/b)1/p)O(T (T/b)^{1/p}). With p=1p = 1 this is remerge, with its Θ(T2/b)\Theta(T^2/b) cost. With p=2p = 2 the cost is O(TT/b)O(T \sqrt{T/b}) and each query reads at most two partitions.
  • Space. O(b)O(b) words of memory for the buffer, and O(T)O(T) words of disk, plus room for the output of one merge.

Properties

  • Online. A posting can be found by queries right after GEOM-ADD returns.
  • One merge per flush. Unlike the chain of pairwise merges of logarithmic merging, one flush does one multiway merge, so a posting moves up several levels in one write.
  • Tunable. The radix rr, or the bound pp, sets the trade-off between update cost and query cost.
  • Deterministic. The partition sizes depend only on mm, rr and bb.

Variants and improvements

  • Fixed pp. Lester, Moffat and Zobel also describe the form in which the number of partitions is bounded by pp, and the radix is chosen from the current size so that pp partitions are enough. The radix then grows slowly as the index grows.
  • Hybrid with in-place update. Long posting lists can be kept in a separate structure that is updated in place, so that the merges only rewrite the short lists.
  • Ratio 2 with pairwise merges. Manning, Raghavan and Schuetze present the case r=2r = 2 as logarithmic merging, with a chain of pairwise merges for a carry. See logarithmic merging.
  • Leveled and tiered merge policies. In a log-structured merge tree, a leveled policy keeps one run per level, like remerge at each level, and a tiered policy keeps up to rr runs per level, like geometric partitioning.
  • Deletions. As for other merge schemes, deleted documents go to an invalidation list, and the merges drop their postings when they rewrite a partition.

When to use it

Use geometric partitioning for a text index that grows all the time while it answers queries, when a full remerge at each flush is too slow and a large number of partitions would slow the queries. Pick rr from the ratio of queries to updates: a small rr for heavy update loads, a larger rr, or the fixed-pp form with p=2p = 2 or 3, when queries dominate. For a static collection, build once with single-pass in-memory indexing.

Pitfalls

  • Merging only with the next partition. If line L5 merges the buffer only with PkP_k and leaves P1,…,Pk−1P_1, \ldots, P_{k-1} in place, the partitions below kk stay full, the next flush finds the same kk again, and the sizes no longer follow the counter. The merge must take all of Z,P1,…,PkZ, P_1, \ldots, P_k, as in line L5, and line L6 must empty the lower partitions.
  • Wrong full test. The test of line L4 must compare with the capacity (r−1)rk−1b(r - 1) r^{k-1} b. With a smaller threshold such as rk−1br^{k-1} b, a level is merged up before it is full, the sizes stop following the base rr counter, and the bounds of the Complexity section no longer hold.
  • Claiming a fixed number of partitions with a fixed rr. With a fixed radix, the number of partitions grows as log⁡r(T/b)\log_r(T/b). Only the fixed-pp form bounds it, and then the merge cost grows as a power of TT.
  • Statistics per partition. A ranking function needs collection-wide document frequencies. They must be summed over the partitions, or kept in a separate table, or the scores change with the partition layout.
  • Disk space during a merge. The new partition is written before the old ones are deleted, so the largest merge needs free disk space for a copy of most of the index.

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.

geometric_partitioning.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/geometric-partitioning/. The authors are listed in prov/J597QM.jsonl.

import bisect
import heapq
from typing import Any

Posting = tuple[Any, int, int]  # (term, document id, term frequency)


class GeometricIndex:
    """Geometric partitioning with a fixed radix r >= 2 and an in-memory buffer of b postings.

    Partition k (k = 1, 2, ...) is one sorted index on disk. It is empty or holds
    j * r^(k-1) * b postings for some j in 1..r-1, so at most (r-1) r^(k-1) b.
    A flush merges the buffer and partitions 1..k into partition k, where k is
    the first partition that is not full. Postings must be distinct.
    writes[p] counts how many times posting p was written to disk, and written
    is the total over all postings.
    """

    def __init__(self, r: int, b: int) -> None:
        if r < 2 or b < 1:
            raise ValueError("need r >= 2 and b >= 1")
        self.r, self.b = r, b
        self.buffer: list[Posting] = []
        self.parts: list[list[Posting]] = []  # parts[k - 1] is partition k
        self.writes: dict[Posting, int] = {}
        self.written = 0
        self.flushes = 0

    def capacity(self, k: int) -> int:
        """The most postings that partition k may hold: (r - 1) r^(k - 1) b."""
        return (self.r - 1) * self.r ** (k - 1) * self.b

    def add(self, x: Posting) -> None:
        """Insert one posting. Cost O(b) for the buffer insert, plus one multiway merge on a flush."""
        bisect.insort(self.buffer, x)  # @line L1
        self.writes[x] = 0
        if len(self.buffer) == self.b:  # @line L2
            k = 1  # @line L3
            while k <= len(self.parts) and len(self.parts[k - 1]) == self.capacity(k):  # @line L4
                k += 1
            if k > len(self.parts):
                self.parts.append([])
            sources = [self.buffer] + self.parts[:k]
            merged = list(heapq.merge(*sources))  # @line L5
            for p in merged:
                self.writes[p] += 1
            self.written += len(merged)
            for i in range(k - 1):  # @line L6
                self.parts[i] = []
            self.parts[k - 1] = merged
            self.buffer = []
            self.flushes += 1

    def postings(self, term: Any) -> list[tuple[int, int]]:
        """The posting list of term: the union over the buffer and all partitions, sorted by doc id."""
        out: list[tuple[int, int]] = []
        for part in [self.buffer] + self.parts:  # @line L7
            lo = bisect.bisect_left(part, (term,))
            while lo < len(part) and part[lo][0] == term:
                out.append((part[lo][1], part[lo][2]))
                lo += 1
        out.sort()
        return out  # @line L8

    def all_postings(self) -> list[Posting]:
        """Every posting held, in sorted order."""
        out = list(self.buffer)
        for part in self.parts:
            out.extend(part)
        out.sort()
        return out

    def check_invariant(self) -> None:
        assert len(self.buffer) < self.b and self.buffer == sorted(self.buffer)
        m = self.flushes
        for k, part in enumerate(self.parts, start=1):
            digit = (m // self.r ** (k - 1)) % self.r
            assert len(part) == digit * self.r ** (k - 1) * self.b
            assert part == sorted(part)
test_geometric_partitioning.py 122 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/geometric-partitioning/. The authors are listed in prov/J597QM.jsonl.

import random

from geometric_partitioning import GeometricIndex


def random_postings(rng: random.Random, docs: int, vocab: int) -> list[tuple[str, int, int]]:
    out = []
    for d in range(1, docs + 1):
        for t in rng.sample(range(vocab), rng.randint(0, min(vocab, 6))):
            out.append((f"t{t}", d, rng.randint(1, 3)))
    return out


def direct(postings: list[tuple[str, int, int]]) -> dict[str, list[tuple[int, int]]]:
    m: dict[str, list[tuple[int, int]]] = {}
    for t, d, f in postings:
        m.setdefault(t, []).append((d, f))
    return {t: sorted(p) for t, p in m.items()}


def v(t: int, r: int) -> int:
    """The number of times r divides t, for t >= 1."""
    c = 0
    while t % r == 0:
        t //= r
        c += 1
    return c


def floor_log(m: int, r: int) -> int:
    """floor(log_r m) for m >= 1, in integers."""
    c = 0
    while m >= r:
        m //= r
        c += 1
    return c


def exact_total(m: int, r: int, b: int) -> int:
    """Postings written by m flushes: flush t forms (t mod r^(v_r(t)+1)) b postings."""
    return b * sum(t % r ** (v(t, r) + 1) for t in range(1, m + 1))


def fill(idx: GeometricIndex, count: int) -> None:
    for i in range(count):
        idx.add(("x", i + 1, 1))


def test_radix_three_nine_bufferloads() -> None:
    idx = GeometricIndex(3, 1)
    sizes = []
    for t in range(1, 10):
        before = idx.written
        idx.add(("x", t, 1))
        sizes.append(idx.written - before)
        idx.check_invariant()
    assert sizes == [1, 2, 3, 1, 2, 6, 1, 2, 9]
    assert idx.written == 27
    assert [len(p) for p in idx.parts] == [0, 0, 9]


def test_radix_two_matches_doubling_sizes() -> None:
    idx = GeometricIndex(2, 4)
    fill(idx, 32)
    assert [len(p) for p in idx.parts] == [0, 0, 0, 32]
    assert idx.written == 4 * (1 + 2 + 1 + 4 + 1 + 2 + 1 + 8)


def test_partition_contents() -> None:
    idx = GeometricIndex(3, 2)
    fill(idx, 2 * 14)  # 14 = 112 in base 3
    assert [len(p) for p in idx.parts] == [4, 6, 18]
    idx.check_invariant()


def test_edge_cases() -> None:
    idx = GeometricIndex(2, 1)
    assert idx.postings("a") == [] and idx.all_postings() == []
    idx.add(("a", 3, 1))
    assert idx.parts == [[("a", 3, 1)]] and idx.buffer == []
    for bad in [(1, 1), (2, 0)]:
        try:
            GeometricIndex(*bad)
        except ValueError:
            pass
        else:
            raise AssertionError("bad parameters were accepted")


def test_random_union_and_write_bound() -> None:
    rng = random.Random(20261118)
    for _ in range(150):
        r = rng.randint(2, 5)
        b = rng.randint(1, 6)
        stream = random_postings(rng, rng.randint(0, 40), rng.randint(1, 12))
        idx = GeometricIndex(r, b)
        inserted = []
        for x in stream:
            idx.add(x)
            inserted.append(x)
            idx.check_invariant()
            assert idx.all_postings() == sorted(inserted)
            m = idx.flushes
            bound = (r - 1) * (1 + floor_log(m, r)) if m >= 1 else 0
            assert max(idx.writes.values()) <= bound
            assert idx.written == exact_total(m, r, b)
        want = direct(inserted)
        for t in set(want) | {"absent"}:
            assert idx.postings(t) == want.get(t, [])


def test_bound_is_reached() -> None:
    # With r^K flushes, the first postings are written (r - 1) K + 1 times: r - 1 at
    # each of the levels 1..K and once more when they reach level K + 1.
    for r in (2, 3, 4):
        idx = GeometricIndex(r, 1)
        fill(idx, r ** 3)
        assert max(idx.writes.values()) == (r - 1) * 3 + 1
        assert (r - 1) * 3 + 1 <= (r - 1) * (1 + floor_log(r ** 3, r))

History

Lester, Moffat and Zobel introduced geometric partitioning at CIKM 2005, after a study of the rebuild, in-place and remerge strategies for on-line index construction, and they extended the work in a 2008 journal paper in ACM Transactions on Database Systems. The same structure with ratio 2 appears as logarithmic merging in the textbook of Manning, Raghavan and Schuetze, and it is a form of the binary transformation of Bentley and Saxe for decomposable searching problems.

References

  1. Nicholas Lester, Alistair Moffat and Justin Zobel, Fast on-line index construction by geometric partitioning, Proceedings of the 14th ACM International Conference on Information and Knowledge Management (CIKM 2005), pages 776 to 783, Section 3 (merge-based update, rebuild, in-place update and remerge) and Section 4 (geometric partitioning, the radix r and the fixed number p of partitions)
  2. Nicholas Lester, Alistair Moffat and Justin Zobel, Efficient online index construction for text databases, ACM Transactions on Database Systems 33(3), Article 19, 2008, the journal version, with geometric partitioning and its comparison with in-place and remerge strategies
  3. Stefan Buettcher, Charles L. A. Clarke and Gordon V. Cormack, Information Retrieval, Implementing and Evaluating Search Engines, MIT Press, 2010, Chapter 7 (dynamic inverted indices), Section 7.2 (incremental index updates)
  4. Christopher D. Manning, Prabhakar Raghavan and Hinrich Schuetze, Introduction to Information Retrieval, Cambridge University Press, 2008, Chapter 4, Section 4.5 (dynamic indexing and logarithmic merging, the case of ratio 2)

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 proofH2 full proof
  • correctness: no review record reviews/J597QM/proof-correctness.yaml
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
  • History with a source
  • a scene preset for the example