AFTD Auto-Formalizing Theoretical Domains

doubled_triangle_ring_faces

def

Given a ring R of type DoubledTriangleRing n, doubled_triangle_ring_faces R returns the finite set of faces f : DoubledTriangleFace n belonging to R: for an x-ring .x k, faces with first coordinate i = k; for a y-ring .y k, faces with second coordinate j = k; and for a z-ring .z k (the strip k ≤ z ≤ k+1 where z = n - x - y), up-faces satisfying i + j + k + 1 = n and down-faces satisfying i + j + k + 2 = n.

Statement

def doubled_triangle_ring_faces {n : ℕ} (R : DoubledTriangleRing n) : Finset (DoubledTriangleFace n)
Defined in
arXiv:2611.12065, Definition 4.1
Verified
10 Nov 2026
Axioms
none listed
Built on 2
  • 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)…
Used by 3

Read back from the Lean

Given a natural number $n$ and an element $R : \text{DoubledTriangleRing } n$, doubled_triangle_ring_faces R is defined as the finite set of faces $f : \text{DoubledTriangleFace } n$ satisfying: - If $R = \text{DoubledTriangleRing.x } k$ (with $k : \text{Fin } n$), then $i = k$, where $i$ is the first coordinate of $f$ (for both up and down faces); - If $R = \text{DoubledTriangleRing.y } k$ (with $k : \text{Fin } n$), then $j = k$, where $j$ is the second coordinate of $f$ (for both up and down faces); - If $R = \text{DoubledTriangleRing.z } k$ (with $k : \text{Fin } n$), then: - $(i : \mathbb{N}) + (j : \mathbb{N}) + (k : \mathbb{N}) + 1 = n$ if $f = \text{DoubledTriangleFace.up front } i\ j\ h$; - $(i : \mathbb{N}) + (j : \mathbb{N}) + (k : \mathbb{N}) + 2 = n$ if $f = \text{DoubledTriangleFace.down front } i\ j\ h$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The finite set of faces of T(n) lying in a ring R. -/
def doubled_triangle_ring_faces {n : ℕ} (R : DoubledTriangleRing n) : Finset (DoubledTriangleFace n) := Finset.univ.filter (fun f =>
    (match R, f with
    | .x k, .up _ i _ _ => i == k
    | .x k, .down _ i _ _ => i == k
    | .y k, .up _ _ j _ => j == k
    | .y k, .down _ _ j _ => j == k
    | .z k, .up _ i j _ => (i : ℕ) + (j : ℕ) + (k : ℕ) + 1 == n
    | .z k, .down _ i j _ => (i : ℕ) + (j : ℕ) + (k : ℕ) + 2 == n) = true)
See it in the graphDiscuss this resultChallenge it