AFTD Auto-Formalizing Theoretical Domains

doubled_triangle_ring_faces_nonempty

theoremverified

For any integer n > 0, for every ring R : DoubledTriangleRing n of T(n), the set of faces doubled_triangle_ring_faces R is nonempty.

Statement

theorem doubled_triangle_ring_faces_nonempty {n : ℕ} (hn : 0 < n) (R : DoubledTriangleRing n) :
    (doubled_triangle_ring_faces R).Nonempty
Source
arXiv:2611.12065, Section 4.1
Verified
11 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
  • doubled_triangle_ring_facesGiven a ring R of type DoubledTriangleRing n, doubled_triangle_ring_faces R returns the finite set of faces f : DoubledTriangleFace n…
  • DoubledTriangleRingA ring of the doubled equilateral triangle triangulation T(n), which is either an x-ring X_k, a y-ring Y_k, or a z-ring Z_k for an index k…
  • DoubledTriangleFaceA face of the doubled equilateral triangle triangulation T(n) of side n, which is either an up-triangle U(i,j) or a down-triangle D(i,j)…

Read back from the Lean

For any natural number $n$ such that $0 < n$, and for every ring $R$ of type DoubledTriangleRing n, the finset doubled_triangle_ring_faces R is nonempty (i.e., contains at least one face).

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 is proved by case analysis on the ring R, which must be of the form x(k), y(k), or z(k) for some index k < n. In each case, an explicit upward-pointing face is exhibited: (k, 0) for x(k), (0, k) for y(k), and (n - 1 - k, 0) for z(k). Since n > 0, these coordinates define valid faces that satisfy the respective ring equations.

  1. The goal reduces to proving that each of the three types of rings—x(k), y(k), and z(k)—contains at least one face.

    We split into cases on the ring R. By definition of DoubledTriangleRing, every ring in T(n) is an x-ring x(k), a y-ring y(k), or a z-ring z(k), parameterized by an index k ∈ {0, …, n - 1}.

    line 4

      cases R with
  2. For any ring of the form x(k), the set of faces is nonempty.

    For an x-ring indexed by k, we exhibit the upward-pointing face with coordinates (i, j) = (k, 0). Because k < n and n > 0, the sum k + 0 = k < n, so this face is well-defined. By definition of doubled_triangle_ring_faces, an upward face belongs to x(k) if its first coordinate equals k, which holds since i = k.

    lines 5–9

      | x k =>
        have hk : (k : ℕ) < n := k.isLt
        have h_sum : (k : ℕ) + ((⟨0, hn⟩ : Fin n) : ℕ) < n := by dsimp; omega
        refine ⟨DoubledTriangleFace.up true k ⟨0, hn⟩ h_sum, ?_⟩
        simp [doubled_triangle_ring_faces]
  3. For any ring of the form y(k), the set of faces is nonempty.

    For a y-ring indexed by k, we exhibit the upward-pointing face with coordinates (i, j) = (0, k). The coordinate sum 0 + k = k < n ensures the face is well-defined. An upward face belongs to y(k) if its second coordinate equals k, which holds since j = k.

    lines 10–14

      | y k =>
        have hk : (k : ℕ) < n := k.isLt
        have h_sum : ((⟨0, hn⟩ : Fin n) : ℕ) + (k : ℕ) < n := by dsimp; omega
        refine ⟨DoubledTriangleFace.up true ⟨0, hn⟩ k h_sum, ?_⟩
        simp [doubled_triangle_ring_faces]
  4. For any ring of the form z(k), the set of faces is nonempty.

    For a z-ring indexed by k, we choose the upward-pointing face with coordinates (i, j) = (n - 1 - k, 0). Since k < n and n > 0, we have n - 1 - k < n and (n - 1 - k) + 0 < n, so the face is well-defined. An upward face belongs to z(k) when i + j + k + 1 = n; substituting i = n - 1 - k and j = 0 gives (n - 1 - k) + 0 + k + 1 = n, which holds by linear arithmetic.

    lines 15–21

      | z k =>
        have hk : (k : ℕ) < n := k.isLt
        have h_lt : n - 1 - (k : ℕ) < n := by omega
        have h_sum : ((⟨n - 1 - (k : ℕ), h_lt⟩ : Fin n) : ℕ) + ((⟨0, hn⟩ : Fin n) : ℕ) < n := by dsimp; omega
        refine ⟨DoubledTriangleFace.up true ⟨n - 1 - (k : ℕ), h_lt⟩ ⟨0, hn⟩ h_sum, ?_⟩
        simp [doubled_triangle_ring_faces]
        omega

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

/-- Every ring of T(n) has at least one face when n > 0. -/theorem doubled_triangle_ring_faces_nonempty {n : ℕ} (hn : 0 < n) (R : DoubledTriangleRing n) :    (doubled_triangle_ring_faces R).Nonempty := by  cases R with  | x k =>    have hk : (k : ℕ) < n := k.isLt    have h_sum : (k : ℕ) + ((⟨0, hn⟩ : Fin n) : ℕ) < n := by dsimp; omega    refine ⟨DoubledTriangleFace.up true k ⟨0, hn⟩ h_sum, ?_⟩    simp [doubled_triangle_ring_faces]  | y k =>    have hk : (k : ℕ) < n := k.isLt    have h_sum : ((⟨0, hn⟩ : Fin n) : ℕ) + (k : ℕ) < n := by dsimp; omega    refine ⟨DoubledTriangleFace.up true ⟨0, hn⟩ k h_sum, ?_⟩    simp [doubled_triangle_ring_faces]  | z k =>    have hk : (k : ℕ) < n := k.isLt    have h_lt : n - 1 - (k : ℕ) < n := by omega    have h_sum : ((⟨n - 1 - (k : ℕ), h_lt⟩ : Fin n) : ℕ) + ((⟨0, hn⟩ : Fin n) : ℕ) < n := by dsimp; omega    refine ⟨DoubledTriangleFace.up true ⟨n - 1 - (k : ℕ), h_lt⟩ ⟨0, hn⟩ h_sum, ?_⟩    simp [doubled_triangle_ring_faces]    omega
See it in the graphDiscuss this resultChallenge it