AFTD Auto-Formalizing Theoretical Domains

is_leaf_piece_thread

def

A leaf thread of a piece of a tree T is a piece thread at least one of whose endpoints is a special vertex of T.

Statement

def is_leaf_piece_thread {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] {u v : V} (p : T.Walk u v) : Prop
Defined in
arXiv:2610.15145, Question 11.4
Verified
25 Oct 2026
Axioms
none listed
Built on 2
  • is_piece_threadA thread of a piece of a tree T is a path of length at least 1 whose interior vertices have degree 2 and are not special, and whose…
  • is_tree_specialA vertex in a graph is special if it is not a leaf (degree not equal to 1) but is adjacent to a leaf (degree 1).

Read back from the Lean

Given a finite type V with decidable equality, a simple graph T on V with decidable adjacency, vertices u, v : V, and a walk p from u to v in T, is_leaf_piece_thread T p asserts that p is a "piece thread" in T (is_piece_thread T p) and at least one of its endpoints u or v is "tree-special" (is_tree_special T u ∨ is_tree_special T v).

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

/-- A leaf thread of a piece is a thread at least one of whose endpoints is a leaf of the piece. -/
def is_leaf_piece_thread {V : Type*} [Fintype V] [DecidableEq V]
    (T : SimpleGraph V) [DecidableRel T.Adj] {u v : V} (p : T.Walk u v) : Prop := is_piece_thread T p ∧ (is_tree_special T u ∨ is_tree_special T v)
See it in the graphDiscuss this resultChallenge it