mem_lattice_graph_two_one_neighbors
For v u : ℤ × ℤ, u belongs to the finset lattice_graph_two_one_neighbors v if and only if lattice_graph_two_one.Adj v u.
Statement
theorem mem_lattice_graph_two_one_neighbors (v u : ℤ × ℤ) : u ∈ lattice_graph_two_one_neighbors v ↔ lattice_graph_two_one.Adj v u- Source
- arXiv:2611.18633 Section 1
- Verified
- 23 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 4
- lattice_graph_two_oneThe radius-one lattice graph G_{2,1} on ℤ² has an edge between distinct lattice points u and v if and only if |u₁ - v₁| ≤ 1 and |u₂ - v₂|…
- lattice_graph_two_one_neighborsFor v : ℤ × ℤ, lattice_graph_two_one_neighbors v is the Finset (ℤ × ℤ) defined by erasing v from lattice_ball_one v.
- LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder. - TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or…
Read back from the Lean
For all lattice points $v, u \in \mathbb{Z} \times \mathbb{Z}$, $u$ belongs to lattice_graph_two_one_neighbors v if and only if $v$ and $u$ are adjacent in lattice_graph_two_one.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The theorem establishes that a vertex $u$ belongs to the neighbor finset of $v$ in the lattice graph $G_{2,1}$ if and only if $v$ and $u$ are adjacent. Unfolding the definitions of the neighbor finset (the $L_\infty$ ball of radius 1 centered at $v$, excluding $v$) and graph adjacency ($v \ne u$ and $|v_i - u_i| \le 1$ coordinate-wise) reduces both sides to coordinate inequalities. Both directions of the equivalence then follow immediately from the symmetry of inequality and linear integer arithmetic.
Unfolding definitions reduces the equivalence to coordinate-wise inequalities and vertex distinctness.
Unfold the definitions of the neighbor set `lattice_graph_two_one_neighbors` (the punctured ball of radius 1), the graph adjacency `lattice_graph_two_one.Adj`, and the ball `lattice_ball_one`. Rewriting interval membership in the product using `Finset.mem_Icc` and absolute value bounds using `abs_le` reduces both sides to the condition that $u \ne v$ and each coordinate difference has absolute value at most 1.
uses
Finset.mem_Icc,abs_lesimp [lattice_graph_two_one_neighbors, lattice_graph_two_one, lattice_ball_one, Finset.mem_Icc, abs_le]It suffices to prove the equivalence in both directions.
Split the bi-implication into two goals: showing that membership in the neighbor set implies adjacency, and conversely that adjacency implies membership.
constructorMembership in the neighbor finset implies graph adjacency.
Assume $u \ne v$ and the coordinate bounds $(v_1 \le u_1 + 1 \land u_1 \le v_1 + 1)$ and $(v_2 \le u_2 + 1 \land u_2 \le v_2 + 1)$. Symmetrizing $u \ne v$ via `Ne.symm` yields $v \ne u$, and the adjacency inequalities for each coordinate follow by linear integer arithmetic (`omega`).
uses
Ne.symm· rintro ⟨h1, h2, h3, h4⟩ exact ⟨Ne.symm h1, by omega, by omega⟩Graph adjacency implies membership in the neighbor finset.
Conversely, assume $v \ne u$ and the coordinate bounds of adjacency. Symmetrizing $v \ne u$ via `Ne.symm` gives $u \ne v$, and the required coordinate bounds for membership in the neighbor finset follow by linear integer arithmetic (`omega`).
uses
Ne.symm· rintro ⟨h1, h2, h3⟩ exact ⟨Ne.symm h1, by omega, by omega⟩
Finset.mem_Icc- An element belongs to a closed interval $[a, b]$ if and only if it is between $a$ and $b$ inclusive: $x \in [a, b] \iff a \le x \land x \le b$.
abs_le- The absolute value of $a$ is at most $b$ if and only if $-b \le a \le b$.
Ne.symm- Inequality is symmetric: if $a \neq b$, then $b \neq a$.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- Equivalence between membership in the neighbor finset and adjacency in G_{2,1}. -/theorem mem_lattice_graph_two_one_neighbors (v u : ℤ × ℤ) : u ∈ lattice_graph_two_one_neighbors v ↔ lattice_graph_two_one.Adj v u := by simp [lattice_graph_two_one_neighbors, lattice_graph_two_one, lattice_ball_one, Finset.mem_Icc, abs_le] constructor · rintro ⟨h1, h2, h3, h4⟩ exact ⟨Ne.symm h1, by omega, by omega⟩ · rintro ⟨h1, h2, h3⟩ exact ⟨Ne.symm h1, by omega, by omega⟩