AFTD Auto-Formalizing Theoretical Domains

even_linked_double_star

def

For natural numbers p, n, and m, the even-linked double star S_{2p}(n, m) is the simple graph on vertex set Fin(2p) ⊕ Fin(n) ⊕ Fin(m) whose edges consist of the path of length 2p - 1 on Fin(2p), edges joining 0 to each of the n leaves in Fin(n), and edges joining 2p - 1 to each of the m leaves in Fin(m).

Statement

def even_linked_double_star (p n m : ℕ) : SimpleGraph (Fin (2 * p) ⊕ Fin n ⊕ Fin m)
Defined in
arXiv:2611.19632, Section 1
Verified
18 Nov 2026
Axioms
none listed
Used by 17

Read back from the Lean

Definition of even_linked_double_star, a function taking natural numbers p, n, and m, and returning the simple graph on vertices Fin (2 * p) ⊕ (Fin n ⊕ Fin m) constructed from the relation where two distinct vertices u and v are adjacent if and only if one of the following holds: 1. u = Sum.inl i and v = Sum.inl j for some i, j : Fin (2 * p) with i.val + 1 = j.val or j.val + 1 = i.val (forming a path of 2*p vertices); 2. one of u, v is Sum.inl i with i.val = 0 and the other is Sum.inr (Sum.inl l) for some l : Fin n (connecting the first path vertex to n leaf vertices); 3. one of u, v is Sum.inl i with i.val + 1 = 2 * p and the other is Sum.inr (Sum.inr r) for some r : Fin m (connecting the last path vertex to m leaf vertices).

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 even-linked double star S_{2p}(n, m) with 2p path vertices, n leaves at the first endpoint, and m leaves at the second. -/
def even_linked_double_star (p n m : ℕ) : SimpleGraph (Fin (2 * p) ⊕ Fin n ⊕ Fin m) :=
  SimpleGraph.fromRel fun u v =>
    (∃ (i j : Fin (2 * p)), u = Sum.inl i ∧ v = Sum.inl j ∧ (i.val + 1 = j.val ∨ j.val + 1 = i.val)) ∨
    (∃ (i : Fin (2 * p)) (l : Fin n), i.val = 0 ∧
      ((u = Sum.inl i ∧ v = Sum.inr (Sum.inl l)) ∨ (u = Sum.inr (Sum.inl l) ∧ v = Sum.inl i))) ∨
    (∃ (i : Fin (2 * p)) (r : Fin m), i.val + 1 = 2 * p ∧
      ((u = Sum.inl i ∧ v = Sum.inr (Sum.inr r)) ∨ (u = Sum.inr (Sum.inr r) ∧ v = Sum.inl i)))
See it in the graphDiscuss this resultChallenge it