Formalizing Percolation Problems with AI-Assisted Proof Tools

    A practical guide to formalizing percolation threshold statements in a proof assistant: lattice and measure modeling, AI-assisted lemma drafting, verification checklists, common pitfalls, and engineering best practices for reproducible, auditable formal proofs.

    Percolation theory describes the macroscopic phase transition of connected clusters in random media: edges or sites of a lattice are opened independently with a given probability, and when that probability crosses a critical value, an infinite connected cluster switches from appearing almost never to appearing with positive probability. One of the classic open questions is whether the probability of an infinite cluster at the critical point is zero. The statement connects probability theory, statistical physics, and geometry, and is remarkably concise—yet a traditional paper proof relies on delicate scaling arguments, correlation decay, and lattice symmetries, where details are easily lost in transcription.

    Encoding the statement in an interactive theorem prover—expressing “almost surely,” “critical value,” and “infinite cluster” as types, measures, and events inside a checkable logical kernel—significantly reduces the risk of hidden assumptions and clerical errors. AI programming tools excel at drafting lemma candidates, aligning definitions, and completing mechanical steps, but final credibility still depends on the axiom set, remaining sorry placeholders, and whether the challenge file matches the solution file verbatim. This article walks through problem abstraction, modeling conventions, the assisted proof workflow, static verification, and engineering practice, offering a reusable path.

    1. Problem Abstraction and Formalization Goals

    Percolation models are usually defined on the integer lattice. Bond percolation assigns open/closed status to each edge independently; site percolation does the same for vertices. The open edges (or sites) induce a random subgraph, and if the connected component containing the origin is unbounded, the “infinite cluster” event occurs. The percolation probability is the measure of this event; the critical probability is defined as the infimum of values at which that measure turns from zero to positive.

    A standard formulation of the target statement is: at the critical point, the measure of the infinite-cluster event is zero. A formalization must simultaneously pin down:

    • the lattice dimension and adjacency relation,
    • the independent product measure,
    • the infinite-volume limit or the σ-algebra generated by cylinder sets,
    • the existence of the critical value as an infimum,
    • and “infinite cluster” expressed as the limit of increasing finite-radius events.

    If any one of these is left ambiguous, subsequent lemmas cannot be aligned within the kernel.

    2. Modeling Conventions: Lattice, Measure, and Events

    Start by building a parameterizable lattice interface: dimension, coordinates, edge sets, and translation/reflection symmetries. Use a product measure on cylinder sets as the probability space, with edge-open indicators as independent Bernoulli random variables. Connectivity within a finite window is defined via graph reachability; the infinite cluster is then obtained by taking a limit over window radii. The critical value should not be written as an “empirical threshold”—express it as the infimum at which the percolation probability becomes positive, and prove it lies in a suitable open interval (if the model permits).

    Statements about continuity or vanishing at criticality should be decomposed into: subcritical exponential decay (or bounded finite-cluster moments), absence of an infinite cluster at the critical point, and any monotone coupling arguments needed.

    When AI generates code, the most common deviations are treating finite-volume events directly as infinite-volume ones, or writing conditional independence as unconditional independence. The challenge file should therefore expose only definitions and the final theorem statement, while the solution file contains the proof—the two must share identical signatures.

    3. Division of Labor: AI Assistance with Human Oversight

    Open mathematical problems should not be expected to fall to one-shot automation. A more reliable workflow is:

    1. Humans write the definition layer and the main theorem statement.
    2. Tools complete standard lemmas (monotonicity, FKG-type correlation, union-find-style finiteness of connectivity).
    3. Humans review whether key inequalities and scaling assumptions have been quietly strengthened.
    4. Classify every sorry: definition gap, combinatorial fact, or analytic estimate.

    If a step depends on an external theorem that has not been formalized, wrap it explicitly as a documented axiom and list it in the verification report, rather than burying it in tactic scripts. For highly geometric objects like percolation, graphical intuition cannot replace induction and coupling: for instance, using exploration processes or arm events to control connectivity near the critical point requires writing the “four arms at radius r” as computable cylinder events before taking limits.

    AI tools are good at translating paper paragraphs into tactic sequences, but poor at spotting issues like “a dimension assumption hard-coded to two dimensions” or “translation invariance assumed but never used for ergodicity.” After each generation, run dimension-parameter sweeps and coverage checks on symmetry lemmas.

    4. Verification Checklist: From Statement to Kernel

    Once pinned to a commit or version, check the following items one by one—ideally cross-checked by two independent tools or two reviewers:

    1. Does the final theorem’s type exactly correspond to “percolation probability is zero at the critical point,” not the weaker “zero below criticality”?
    2. Does the lattice cover the target dimension, with standard nearest-neighbor adjacency?
    3. Is the measure an independent product, with no extra dependence axioms?
    4. Is the critical value defined as an infimum rather than a numerical approximation?
    5. Is the infinite cluster a limiting event, not a finite-window quantity that merely “looks large”?
    6. Do the challenge and solution files match verbatim in theorem names, parameters, and conclusions?
    7. Does a full-repository scan show no unresolved sorry, extraneous axioms, or unreviewed external imports?
    8. Does a clean-environment build succeed, with kernel re-check logs from the proof assistant confirming nothing was skipped?

    If any item fails, the result is only a “draft,” not a completed formal proof.

    5. Common Pitfalls and Robust Patterns

    Pitfalls include: using floating-point or numerical experiments to imply critical values; copying high-dimensional proofs to low dimensions without adjusting arm exponents; substituting unconditional independence for conditional independence; and using non-constructive forms of the axiom of choice to handle “the existence of an infinite-cluster realization.”

    Robust patterns are: write all limits as monotone statements in finite volume first, then pass to the limit; prove probability equalities via coupling rather than density calculations; and reduce geometric facts to combinatorial propositions on finite graphs wherever possible.

    The documentation layer should state which classical statement each definition corresponds to, so that later readers do not mistake “scaffolding” for a completed proof. If a repository contains unmerged working branches, external communication should be explicit: unmerged status, scaffolding content, or repeatedly revised titles all indicate the work has not reached a citable standard.

    6. Engineering Practice and Transferable Lessons

    When integrating formal mathematics into a development pipeline, you can use object storage to keep build artifacts and kernel logs, message queues to trigger incremental compilation, container platforms to pin proof-assistant versions, and logging and monitoring to track sorry counts and axiom-set changes.

    For version policy: the main branch should only hold projects that pass full verification; experimental statements belong in isolated directories, with no inflated titles or claims.

    For teams, the biggest benefit is not “the machine proving some famous conjecture first,” but establishing a reproducible definition layer, auditable axiom boundaries, and cross-checkable static verification. The percolation criticality statement is simply a highly recognizable testbed: once the lattice, measure, and event interfaces are stable, similar phase-transition problems (Ising, random-cluster models, first-passage percolation) can reuse the same skeleton.

    AI assistance shortens the time spent on mechanical gap-filling; what determines correctness is still the logical kernel and the review checklist. Following the path in this article, readers can advance open critical-phenomena problems to a formalized state that is checkable, reproducible, and continuously strengthenable—without depending on any particular vendor narrative.