AFTD Auto-Formalizing Theoretical Domains

Kruskal.symAdj_mono

theoremverifiedimported Lean

Monotonicity of symmetric adjacency. Fix $n \in \bbn$ and two vertices $u, v \in \mathrm{Fin}\,n$, and let $e_1$ and $e_2$ be lists of weighted edges on $n$ vertices such that every edge of $e_1$ also occurs in $e_2$. If $u$ and $v$ are symmetrically adjacent in $e_1$ — that is, some edge of $e_1$ has endpoints $\{u,v\}$ in either order — then $u$ and $v$ are symmetrically adjacent in $e_2$.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
lemma Kruskal.symAdj_mono {n : ℕ} {e1 e2 : List (WEdge n)} {u v : Fin n}
    (h : SymAdj e1 u v) (hs : ∀ e ∈ e1, e ∈ e2) : SymAdj e2 u v
Source
TCSlib, `Kruskal.symAdj_mono`
Lean proof
By [Your Name], [Partner's Name (if applicable)], from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Copyright (c) 2026 [Your Name] and [Partner's Name (if applicable)]. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.
Verified
07 Oct 2026
Axioms
none — Lean reports it depends on no axioms
Built on 2
  • Kruskal.SymAdjGiven a list of weighted edges $\mathit{edges}$ on $n$ vertices, $\mathtt{SymAdj}\,\mathit{edges}\,u\,v$ holds when there exists an edge…
  • Kruskal.WEdgeA weighted edge over $n$ vertices is a structure with two endpoints $u, v : \mathrm{Fin}\,n$ and a natural-number weight…
Used by 1
  • Kruskal.reach_monoMonotonicity of reachability under edge addition. Fix $n$, let $e_1$ and $e_2$ be lists of weighted edges on the vertex set…

Lean source view module on GitHub

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
lemma Kruskal.symAdj_mono {n : ℕ} {e1 e2 : List (WEdge n)} {u v : Fin n}
    (h : SymAdj e1 u v) (hs : ∀ e ∈ e1, e ∈ e2) : SymAdj e2 u v :=
  h.imp fun _ he => ⟨hs _ he.1, he.2⟩
See it in the graphDiscuss this resultChallenge it