AFTD Auto-Formalizing Theoretical Domains

disjoint_copies_graph

def

For any natural number m and simple graph G on vertex type V, the graph of m disjoint copies of G has vertex set Fin m × V, with vertices adjacent if and only if they belong to the same copy and are adjacent in G.

Statement

def disjoint_copies_graph (m : ℕ) {V : Type*} (G : SimpleGraph V) : SimpleGraph (Fin m × V)
Defined in
arXiv:2611.14160 Section 1
Verified
12 Nov 2026
Axioms
none listed

Read back from the Lean

Given a natural number $m$, a type $V$, and a simple graph $G$ on $V$, disjoint_copies_graph m G is the simple graph on the vertex type Fin m × V where two vertices $(i, u)$ and $(j, v)$ are adjacent if and only if $i = j$ and $u$ is adjacent to $v$ in $G$.

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

/-- Disjoint union of m copies of a simple graph G. -/
def disjoint_copies_graph (m : ℕ) {V : Type*} (G : SimpleGraph V) : SimpleGraph (Fin m × V) := {
  Adj := fun ⟨i, u⟩ ⟨j, v⟩ => i = j ∧ G.Adj u v
  symm := ⟨fun ⟨_, _⟩ ⟨_, _⟩ ⟨h1, h2⟩ => ⟨h1.symm, G.adj_symm h2⟩⟩
  loopless := ⟨fun ⟨_, u⟩ ⟨_, h2⟩ => G.loopless.irrefl u h2⟩
}
See it in the graphDiscuss this resultChallenge it