Lattice geometry · formal theorem

Algebraic Lemma Toward Pick’s Theorem

For any finite cyclic list of lattice vertices inside a coordinate box, its signed shoelace-area sum equals the associated weighted lattice-point sum.

Scope: For any finite cyclic list of lattice vertices contained in a coordinate box, the signed shoelace-area sum equals the associated weighted sum over lattice points in that box.

Lean checkedBuild passed
Unfinished proof stepsNone
PublicationAccepted formal theorem
Pick-lemma route mapFor a bounded cyclic lattice-vertex list, its signed shoelace-style sum equals a weighted sum over lattice points in a containing square.
Exact scope: For any finite cyclic list of lattice vertices contained in a coordinate box, the signed shoelace-area sum equals the associated weighted sum over lattice points in that box.

Exact formal proposition

Hypotheses and conclusion

This is the meaningful proposition proved by the checked wrapper declaration. It is extracted from the same commit-pinned Lean source.

def AlgebraicPickLemma : Prop :=
  ∀ (P : LatticePolygon) (r : Nat), BoundedBy P r →
    polygonArea P = weightedLatticePointSum P r
Definitions used in this proposition

LatticePolygon

structure LatticePolygon where
  len : Nat
  vertex : Fin (len + 1) → LatticePoint

BoundedBy

def BoundedBy (P : LatticePolygon) (r : Nat) : Prop :=
  ∀ i : Fin (P.len + 1), maxAbsCoord (P.vertex i) ≤ r

polygonArea

def polygonArea (P : LatticePolygon) : Rat :=
  ∑ i : Fin (P.len + 1), trapezoidArea (P.vertex i) (P.vertex (i + 1))

edgeWeight

noncomputable def edgeWeight (u v : LatticePoint) (r : Nat) : Rat :=
  ∑ p ∈ latticeBox r, discreteAngle (pointSub u p) (pointSub v p)

weightedLatticePointSum

noncomputable def weightedLatticePointSum (P : LatticePolygon) (r : Nat) : Rat :=
  ∑ i : Fin (P.len + 1), edgeWeight (P.vertex i) (P.vertex (i + 1)) r
Lean wrapper declaration

The checked endpoint names the proposition displayed above. This short declaration is useful for source identity, but the expanded proposition is the mathematical statement to read first.

theorem algebraic_pick_lemma : AlgebraicPickLemma

Proof route

How local lattice contributions telescope into area

5 proof stages

The checked algebraic route proves one oriented edge identity by isolating its active lattice strip, cancelling vertical sign contributions, and telescoping floor and ceiling terms before summing the edge cases around a cyclic list.

These stages follow the checked source and explain the mathematical route. They summarize the argument; they are not a visualization of Lean's internal proof term.

  1. A finite gold-haloed lattice contains one green-to-blue oriented edge; beside it, the matching colored edge bounds a translucent trapezoid over an unlabeled baseline.
    For one oriented edge, the bounded lattice collection is compared with its signed trapezoid contribution.
    01

    One edge, two local contributions

    edgeWeight u v r = trapezoidArea u v

    A finite rectangular lattice surrounds one forest-green-to-cobalt oriented edge, while restrained gold halos mark the lattice points in the bounded collection. Beside it, the matching endpoint colors and direction bound a translucent trapezoid against a horizontal reference line. The stage isolates the local edge comparison before the later cyclic sum and contains no variable labels or formulas.

    Lean lemmas for this step
    • discreteAngle
    • latticeBox
    • trapezoidArea
    • edgeWeight
    • edgeWeight_eq_trapezoidArea
  2. Scientific figure illustrating: Columns outside the endpoint range vanish, while endpoint and strict interior columns carry the active contributions.
    Columns outside the endpoint range vanish, while endpoint and strict interior columns carry the active contributions.
    02

    Only the active x-strip contributes

    Outside columns vanish; endpoint and interior columns have distinct weights

    The discrete-angle lemmas split lattice points by first coordinate. Columns beyond the edge's horizontal endpoint range contribute zero; the two endpoint columns and the strict interior columns have separate formulas that make the remaining finite sum explicit.

    Lean lemmas for this step
    • discreteAngle_pointSub_eq_zero_of_fst_lt_left
    • discreteAngle_pointSub_eq_zero_of_fst_lt_right
    • discreteAngle_pointSub_eq_left_endpoint
    • discreteAngle_pointSub_eq_right_endpoint
    • discreteAngle_pointSub_eq_interior
  3. Scientific figure illustrating: Opposite sign contributions above and below the line cancel within an active column, leaving the crossing term.
    Opposite sign contributions above and below the line cancel within an active column, leaving the crossing term.
    03

    Cancel signs inside one vertical column

    Σᵧ discreteAngle ((x,y)-u) ((x,y)-v)

    Within a strict interior column, the sign of the point-cross expression changes at the edge crossing. Pairing the terms above and below that level cancels the vertical tails and reduces the column sum to the floor-and-ceiling contribution used next.

    Lean lemmas for this step
    • signRat_pointCross_pointSub_left_endpoint
    • signRat_pointCross_pointSub_right_endpoint
    • discreteAngle_pointSub_eq_interior_sign
    • horizontal_interior_column_sum
  4. Scientific figure illustrating: Neighboring floor and ceiling levels interlock across successive columns until only the signed trapezoid envelope remains.
    Neighboring floor and ceiling levels interlock across successive columns until only the signed trapezoid envelope remains.
    04

    Telescope floor and ceiling contributions

    interior column sums telescope to the signed trapezoid

    The floor term from one active column pairs with the ceiling term in the next. Summing across the finite x-strip cancels the intermediate levels and leaves exactly the endpoint expression for trapezoidArea(u,v).

    Lean lemmas for this step
    • interior_column_floor_ceil_bounds
    • interior_column_sum_of_floor_ceil_bounds
    • interior_column_sum
    • interior_columns_sum
    • sum_floor_add_ceil_mul_div_Ioo
  5. A single eight-vertex oriented lattice polygon forms a closed cycle inside a complete bounded lattice box. Arrowheads follow the cycle; vertical drops to a baseline bound translucent green and blue trapezoid contributions, while every lattice point uses the same neutral dot.
    Consecutive oriented edges close into one cycle; their baseline trapezoids assemble across the complete bounded lattice box.
    05

    Assemble algebraic edge weights around one closed cycle

    polygonArea P = weightedLatticePointSum P r

    One eight-vertex cyclic lattice polygon is rendered once inside a complete finite lattice box. Each edge joins consecutive vertices, the final edge returns exactly to the first vertex, and one arrowhead per edge follows the same cyclic order. Vertical drops from all vertices to one horizontal reference level bound the translucent forest and cobalt trapezoid contributions. Every lattice point has identical neutral treatment; the pixels make no interior or boundary classification and assign no numerical weight. The exact algebraic edge-weight identity remains in HTML.

    Lean lemmas for this step
    • edgeWeight_eq_trapezoidArea_of_fst_eq
    • edgeWeight_eq_trapezoidArea_of_snd_eq
    • edgeWeight_eq_trapezoidArea_of_lt
    • edgeWeight_eq_trapezoidArea
    • polygonArea_eq_weightedLatticePointSum_of_edgeWeight_eq
    • algebraic_pick_lemma

The theorem at a glance

The algebraic Pick lemma at a glance

Editorial lattice-geometry poster equating signed cyclic polygon area with distributed discrete-angle weight over a complete bounded lattice box, followed by four edge-to-cycle proof steps and a prominent nonclassical scope boundary.
For a cyclic lattice polygon bounded by r, the signed trapezoid area equals the sum of discrete-angle edge weights over every lattice point in the box.

Accessible transcript

BoundedBy P r → polygonArea P = weightedLatticePointSum P r

The checked proof first identifies the discrete-angle weight of one oriented edge with its signed trapezoid area. Vertical contributions cancel and successive columns telescope; summing the local identity around the cyclic vertex list proves the global equality, even when the list is not simple.

Read the complete poster transcript

LATTICE GEOMETRY · DISCRETE ANGLES

ALGEBRAIC PICK LEMMA

SIGNED AREA = DISTRIBUTED ANGLE WEIGHT

FOR EVERY LATTICE POLYGON P BOUNDED BY r

polygonArea(P) = weightedLatticePointSum(P,r)

Every vertex of P lies in [−r,r] × [−r,r].

polygonArea(P)

The signed cyclic trapezoid sum over oriented edges.

weightedLatticePointSum(P,r)

Discrete-angle contributions from every lattice point in the box.

HOW THE PROOF MOVES

1 · FIX ONE ORIENTED EDGE

Compare its discrete-angle weight with its trapezoid area.

2 · SUM BY LATTICE COLUMNS

Outside columns vanish; endpoint and interior columns telescope.

3 · PROVE THE EDGE IDENTITY

edgeWeight(u,v,r) = trapezoidArea(u,v)

4 · SUM AROUND THE CYCLE

Local edge identities give the global area equality.

EXACT SCOPE

Not the classical formula A = I + B/2 − 1. The cyclic vertex list need not be simple.

No interior-point or boundary-point classification is asserted.

Theorem schematic

Signed area as distributed lattice weight

Scientific figure illustrating: The algebraic Pick lemma equates signed cyclic polygon area with the sum of discrete-angle edge weights over a bounded lattice box.
The algebraic Pick lemma equates signed cyclic polygon area with the sum of discrete-angle edge weights over a bounded lattice box.

polygonArea(P) = weightedLatticePointSum(P,r)

For a cyclic lattice polygon bounded by r, each oriented edge contributes a signed trapezoid area and discrete-angle weights over the complete lattice box. Summing those edge identities gives polygonArea(P) = weightedLatticePointSum(P,r), without classifying points as interior or boundary.

Result boundary

What this theorem does—and does not—establish

For any finite cyclic list of lattice vertices contained in a coordinate box, the signed shoelace-area sum equals the associated weighted sum over lattice points in that box.

About these visual explanations

These AI-generated visuals explain the theorem and proof route; they are not proof evidence. Their publication review was completed separately from review of the formal result. The exact Lean proposition and checked source remain authoritative.

Line counts exclude blank lines; comments and documentation count. The total is the commit-pinned first-party Lean import closure; Mathlib and other third-party dependencies are excluded.

Continue the mathematics

Open questions and extensions

The pinned theorem and its complete local import closure let people and AI agents inspect the proof, compare another route, isolate reusable lemmas, or formulate a stronger exact statement. Lean checks each proposed extension against its own exact statement.

What the source ZIP contains

The ZIP contains the checked first-party Lean import closure, exact statements and boundaries, license, notice, evidence, source-footprint manifest, and continuation data. Mathlib and other third-party dependencies are not bundled.

Independent review

Review record

Independent review accepted

Lean checks the exact proof. Independent reviewers accepted evidence completeness, statement alignment, scope, and public wording; the visual review covers explanation only.

01

Formal evidence

Independent review accepted the recorded build, exact declarations, unfinished-step scan, and axiom evidence.

02

Statement alignment

The formal declaration was accepted against the named theorem and its exact variant.

03

Result boundary

The accepted boundary keeps nearby stronger or commonly confused claims out of scope.

04

Public wording

Independent review accepted the retained theorem explanation and source presentation. Generated media follows a separate review and promotion gate.

05

Canonical source

The first-party source link is pinned to the checked package commit and exact Lean file.

06

Accepted result

A validated accepted-result record binds the four reviews to the checked formalization.

Expanded visual

Open original image