AFTD Auto-Formalizing Theoretical Domains

retained_line_truncate

def

The graph on the same line vertices formed by retaining exactly those edges of the given graph whose endpoint distance is at most k.

Statement

noncomputable def retained_line_truncate {n : ℕ} (G : SimpleGraph (Fin n)) (k : ℕ) : SimpleGraph (Fin n)
Source
OP-815: truncation of the retained line graph by edge length.
Verified
19 Nov 2026
Axioms
none listed
Used by 2

Lean source view module on GitHub

noncomputable def retained_line_truncate {n : ℕ} (G : SimpleGraph (Fin n)) (k : ℕ) : SimpleGraph (Fin n) := {
  Adj v w := G.Adj v w ∧ Nat.dist v.val w.val ≤ k
  symm := by constructor; intro v w h; exact ⟨h.1.symm, by simpa [Nat.dist_comm] using h.2⟩
  loopless := by constructor; intro v h; exact G.irrefl h.1
}
See it in the graphDiscuss this resultChallenge it